In this era of pipelines spanning thousands of miles, the idea of shipping crude across North America in railway cars might seem a quaint throwback to the oil pioneering days of the West.

Yet it's a booming business for North America's railroads, and should remain an important niche market for years to come.

Shipments of crude by rail in the United States have surged from around 11,000 barrels per day in 2007 to an estimated 340,000 bpd in 2012, according to data from the Association of American Railroads. If rail shipments in Canada are added, the volume could top 400,000 bpd, more than 4 percent of North American crude production and equal to a new, large pipeline.

Crude shipments are now the fastest-growing product for several big U.S. and Canadian Class 1 railroads after oil output expanded more quickly than pipeline capacity, particularly in the oil-rich Bakken area of North Dakota.

Railroads allow producers to take advantage of a temporary oil price differential by moving crude from inland oil fields to coastal refineries that pay higher prices linked to Brent crude. Pipelines are either full, or don't reach these refineries.

"We don't expect for the long term that you're going to see a 300 percent growth in crude oil trends," Union Pacific Corp's

Jack Koraleski, chief executive of the biggest U.S. publicly traded railroad, said in an interview. "We think we're going to continue to grow the oil business. The rate of growth will slow from its current over-excited pace, but we still think it will continue to be a good business for us."

The planned expansions of pipelines like the mid-continent Seaway line in the first quarter of 2013 should displace some rail capacity, as pipelines are a cheaper option than rail.

But experts say railways have proved that they can have a lasting role as crude shippers, especially when major pipeline projects such as Keystone XL and Northern Gateway are snarled in politics in the United States and Canada.

"Even if the large growth that we have seen over the last few years does subside, rail will continue to be an important part of the total distribution capacity out there, particularly on a flex basis or a peaking capacity basis, because the model has been proven," said Steve Hansen, a transportation analyst with Raymond James in Vancouver.

Bakken Business

In the Bakken, where hydraulic fracturing has ignited an oil boom, more than half of the 700,000 bpd produced in August was railed, according to the North Dakota Pipeline Authority.

BNSF Railway, owned by Warren Buffett's Berkshire Hathaway Inc, is by far the biggest rail shipper in the Bakken, transporting some 40-45 percent of each month's output, according to company estimates.

BNSF expects to haul close to 90 million barrels of oil this year, and can maintain, or expand this over time, said John Lanigan, BNSF's chief marketing officer.

The prospect of big pipeline expansions doesn't scare him.

"Over time they are not going to have a pipeline going to every segment of the Bakken... So we believe there is always going to be opportunity to rail as long as there is production in the Bakken," Lanigan said.

The Bakken extends from North Dakota into Montana and across the Canadian border into southern Saskatchewan and Manitoba.

Even if Bakken crude-by-rail cools, analysts see opportunities elsewhere -- the Eagle Ford Shale in South Texas, the Permian Basin in West Texas, the Utica shale of Ohio and the Canadian oil sands regions in Alberta.

Canadian Pacific Railway, which also has tracks in the U.S. Bakken, in July moved up by a year to 2013 its forecast for reaching 70,000 carloads of crude, or 46 million barrels.

More Expensive, More Flexible

Using North American railway tracks to ship oil is nothing new. Before 1900, in the days of John D. Rockefeller and his Standard Oil Company, railroads were the chief transport mode for oil before pipelines took over.

"You look at what pipelines can do in terms of their ability to carry large volumes over such lon