Delivering oil thousands of miles by rail from the heartland to refineries on the East, West and Gulf coasts costs more, but it can mean increased profits - up to $10 or more a barrel - because of higher oil prices on the coasts. That works out to roughly $700,000 per train.
The parade of mile-long trains carrying hazardous material out of North Dakota and Montana and across the country has experts and federal regulators concerned. Rail transport is less safe than pipelines, they say, and the proliferation of oil trains raises the risk of a major derailment and spill.
Since 2009, the number of train cars carrying crude hauled by major railroads has jumped from about 10,000 a year to a projected 200,000 in 2012. Much of it has been in the Northern Plains' Bakken crude patch, but companies say oil trains are rolling or will be soon from Texas, Colorado and western Canada.
"This is all occurring very rapidly, and history teaches that when those things happen, unfortunately, the next thing that is going to occur would be some sort of disaster," said Jim Hall, a transportation consultant and former chairman of the National Transportation Safety Board.
Rail companies said the industry places a priority on safety and has invested heavily in track upgrades, provided emergency training and taken other measures to guard against accidents. There have been no major oil train derailments from the Bakken, according to federal regulators.
Union Pacific Railroad CEO Jack Koraleski said hauling oil out of places like North Dakota will be a long-term business for railroads because trains are faster than pipelines, reliable and offer a variety of destinations.
"The railroads are looking at this as a unique opportunity, a game-changing opportunity for their business," said Jeffery Elliot, a rail expert with the New York-based consulting firm Oliver Wyman.
BNSF Railway Co., the prime player in the Bakken, has bolstered its oil train capacity to a million barrels a day and expects that figure to increase further. To accommodate the growth, in part, the railroad is sinking $197 million into track upgrades and other improvements in Montana and North Dakota.
BNSF is also increasing train sizes, from 100 oil cars per train to as many as 118.
Larger trains are harder to control, and that increases the chances of something going wrong, safety experts said. State and local emergency officials worry about a derailment in a population center or an environmentally sensitive area such as a river crossing.
Rail accidents occur 34 times more frequently than pipeline ones for every ton of crude or other hazardous material shipped comparable distances, according to a recent study by the Manhattan Institute, a conservative think tank. The Association of American Railroads contends the study was flawed but acknowledges the likelihood of a rail accident is double or triple the chance of a pipeline problem.
The environmental fears carry an ironic twist: Oil trains are gaining popularity in part because of a shortage of pipeline capacity - a problem that has been worsened by environmental opposition to such projects as TransCanada's stalled Keystone XL pipeline. That project would carry Bakken and Canadian crude to the Gulf of Mexico.
Wayde Schafer, a North Dakota spokesman for the Sierra Club, described rail as "the greater of two evils" because trains pass through cities, over waterways and through wetlands that pipelines can be built to avoid.
"It's an accident waiting to happen. It's going to be a mess and we don't know where that mess is going to be," Schafer said.
For oil companies, the embrace of rail is a matter of expediency. Oil-loading rail terminals can be built in a matter of months, versus three to five years for pipelines to clear regulatory hurdles and be put into service, said Justin Kringstad of the North Dakota Pipeline Authority. Although more pipelines are in the works, he said moving oil by rail will continue.
The surge comes at the right time for railroads: Coal shipments - a mainstay of the rail industry - have suffered because of competition from cheap natural gas.
In the eastern U.S., CSX and Norfolk Southern railroads haven't seen as much growth because oil from the Marcellus Shale area of Pennsylvania, Ohio and New York is close enough to refineries that trucks haul the crude.
Yet BNSF is beginning to haul Bakken crude east to Chicago, where it hands off the tank cars to CSX or Norfolk Southern for delivery to Eastern refineries. It has also sent oil to the West Coast, a trend that could increase if Alaska crude production falters, as some industry observers are predicting.
The growth will require significant upgrades to already congested rail lines, industry analysts said.
Overall, crude oil shipments still represent less than 1 percent of all carloads. And there are far more dangerous materials aboard the nation's trains, including explosives, poisonous gases and other industrial chemicals.
But emergency officials are increasingly wary of major accidents involving oil trains, which carry far more cargo than some other hazardous-material trains.
While oil is not as volatile as some other products, a rupture of just one car can spill 20,000 to 30,000 gallons, said Sheldon Lustig, a rail expert who consults with local governments on accidents and hazardous materials.
Recognizing the risks, Houston-based Musket Corp., an operator of oil train terminals in North Dakota, Wyoming, Colorado, Utah and Oklahoma, has donated spill equipment and provided training to fire officials.
"You want to be a good steward in that community," said Musket managing director JP Fjeld-Hansen.
Federal Railroad Administration officials said they have coordinated hazardous-material training seminars and sought more law enforcement patrols for rail crossings to increase safety.
Federal law requires railroads to select hazardous-material routes after analyzing the potential for accidents in heavily populated areas and environmentally sensitive spots. Those analyses are confidential for security reasons.
Lustig said the railroads have considerable sway over the process.
"Under federal guidelines, the railroad makes the analysis, the railroad decides what they want to do, and the railroad does it," he said. "There is no public accountability."
Funk reported from Omaha, Neb. Associated Press writer James MacPherson in Bismarck, N.D., contributed to this report.