This weekend's horrific railcar explosion in Lac-Mégantic, Quebec, has drawn sudden attention to the rapidly expanding use of railcars to transport crude oil from where it's extracted to where it's refined. In the vitriolic tug-of-war over TransCanada's (TRP -0.33%) Keystone XL pipeline, many have asserted that rail is a viable alternative to the pipeline if President Obama smacks it down. But as accidents continue to increase in number, crude by rail may be losing its luster.

Crude-by-rail growth
It would be hard to overstate the massive growth in crude-by-rail transport. The State Department predicts that Bakken Shale oil shipments will exceed 800,000 barrels per day by the end of this year, up tenfold since August 2011. While moving crude out of North Dakota has been the primary expansion area for rail transport, trains are also playing an increasingly important role in moving oil from Canada's tar sands.

This dramatic expansion has brought with it a series of high-profile accidents, many of them on Canadian Pacific's (CP -6.60%) network. Canadian Pacific moves oil from Alberta's tar sands and the Bakken Shale. It saw the industry's first major spill this past March, when 14 derailed tanker cars gushed 15,000 gallons of crude all over the surrounding landscape. The investigation is ongoing, and the company is tight-lipped on the subject.

The stakes are high. As coal's demise has cost many rail operators a major source of revenue, crude by rail is becoming a small but increasingly important business for such players as Canadian Pacific and BNSF, owned by Warren Buffett's Berkshire Hathaway (BRK.A -0.28%). And Continental Resources (CLR), one of the pioneer Bakken developers, moves three-quarters of its production by train.

Valero Energy (VLO -0.32%) has a crude-by-rail proposal pending at its Benicia, Calif., facility. The project was already seeing growing community backlash before this weekend's explosion, but will now likely face much stronger scrutiny at its July 11 city council hearing.

Implications
It's too early to tell what the likely ramifications of this disaster will be. It would be easy to conclude that this is good news for Keystone XL. However, President Obama has said that the pipeline is only in our national interest if it doesn't "significantly exacerbate the problem of carbon pollution," which of course it does.

Furthermore, it's not necessarily the case that pipelines are safer. While they are less prone to accidents, vastly more oil leaks from a pipeline when it's compromised than from a rail car. The International Energy Agency released a study in May finding that over a recent eight-year period, trains were more likely than pipelines to experience accidents, but breached pipelines spilled three times as much crude as trains. 

For the time being, rail remains a critical bridge over the gaps in pipeline infrastructure. However, incidents like the devastation in Lac-Mégantic demonstrate that it's in everyone's interest to get a lot more serious about safety. The entire industry -- from producers to transport operators -- needs to turn its ingenuity and investment firmly toward securing crude cargo. Otherwise, it risks undermining this vital growth engine, and causing even more human suffering.