Canadian Pacific Railway said Monday that it has shelved plans to build new track in coal country in northeast Wyoming and southeast Montana, citing weakened U.S. demand for coal.

CP said it will "defer indefinitely plans to extend its rail network" into the Powder River Basin, a swath of land between the Black Hills and the Big Horn Mountains that contains one of the largest coal deposits in the world.

The railroad company -- Canada's second-largest -- is taking a $180 million loss on the value of its option to build 260 miles of track in the basin.

The project's scuttling by CP also puts on hold a long-standing dilemma in Rochester. The Mayo Clinic has fought to keep heavy coal traffic away from its property, and the line that was slated to carry the new loads of coal eastward runs 100 feet from the clinic. One proposal has been to build a rail bypass south of town.

Now Hunter Harrison, the new CP chief executive, plans to sell portions of rail line west of Pierre, S.D., Trains News Wire reported, and instead focus on the growing oil business in North Dakota.

Railroad investors have cooled to the prospect of deep investment in coal and CP is being realistic, said Dave Fellon, president of Progressive Rail, a short-rail line owner and operator based in Lakeville.

Demand for coal is shrinking thanks to the abundance of natural gas produced by shale oil and gas drilling in the Northeast, North Dakota and Texas. More power plants have converted from coal to natural gas, and rail shipments of coal have fallen sharply in the past year.

"When you do an investment like that, you've got to be looking out 20 years, and I don't know that there's the stability for that right now," Fellon said. "They're smart people at CP. They've got good intelligence on markets."

Coal rail traffic is down 10.5 percent in 2012, according to the Association of American Railroads, while shipments of petroleum products have risen 44 percent.

In 2007, coal was more appealing. Canadian Pacific, whose U.S. headquarters is in downtown Minneapolis, paid $1.5 billion for the Dakota Minnesota & Eastern railroad in order to get access to the Powder River Basin. Union Pacific and Burlington Northern Santa Fe already have a joint rail line into the basin.

The purchase deal also included contingent payments of up to $1 billion -- $350 million if construction were to start on the basin expansion by 2025, and at least $700 million triggered by specific volumes of coal business CP would have done in the basin.

The railroad announced Monday that it will write down the value of the project by $180 million. Components of the charge include the option itself, engineering design costs, land and capitalized interest. The option is worth less now, and with volume of coal by rail in the United States still falling, CP is unlikely to exercise it.

"All in, the investment was going to be several billion dollars," said Brian Yarbrough, a railroad analyst for Edward Jones. "It would be almost impossible for them to justify the investment now."

Yarbrough said CP's indefinite postponement of the Powder River plan raises the probability the company will sell some of the 2,500 miles of track that make up the Dakota Minnesota & Eastern.

The lines crisscross South Dakota, southern Minnesota, Iowa, and include a route from Chicago to Kansas City, Mo. Canadian Pacific spokesman Ed Greenberg said the railroad is conducting "a complete review" of all its lines.

Trains News Wire also reported that Canadian Pacific's rail yard in St. Paul will become a central hub for the company as it closes or downgrades similar rail yards in Montreal, Toronto, Winnipeg, Calgary and Chicago.

Adam Belz • 612-673-4405 Twitter: @adambelz