The frigid prairie outside Casselton, N.D., transformed in an instant on Dec. 30, as a mushroom of fire and smoke shot hundreds of feet into the air. Railway tankers carrying oil burned wildly, and though the temperature was only about 10 degrees, the responding deputies could feel the heat through their windshields as they drove toward the blaze. Miraculously, no one was killed or injured.

Such a close call defies odds and evokes fears. That’s natural, but some of the reaction has also been illogical, with critics scapegoating the cargo for the crash. While it’s true that this train accident involved oil, responsibility for the accident almost certainly resides with the rail industry, not the energy industry. The alarmists who suggest otherwise are all too often motivated by their own hatred of America’s fossil-fuel boom.

Though the investigation into the Casselton accident is only beginning, initial reports have stated that a westbound train carrying grain — not oil — initially derailed, its cars cluttering the adjacent track. Another train, eastbound and with oil tankers in tow, then crashed into them, with explosive results. The fact that one train was carrying North Dakota oil was merely a coincidence.

Federal investigators are examining what caused the derailment, including potential track problems. Also, the DOT-111-model tankers that were used to transport the oil had already been identified by the federal government as at risk for rupturing during accidents. And the Bismarck Tribune reported that North Dakota’s governor and congressional delegation have come out “in favor of expediting improvements to rail tanker car standards and bringing improved cars into the nation’s tanker car fleet.”

Casselton may have gotten by without casualties, but the residents of Lac-Mégantic, Quebec, were not so lucky. In July 2013, 47 people died after 73 pressurized oil tankers detached from their locomotives, rolled downhill into town and eventually ignited. Yet then, too, the problem was rail-side; brake problems and understaffing were both suspected in the tragedy — problems that would have existed regardless of whether oil was being transported.

Nevertheless, many opponents of oil are hell-bent on blaming the energy source for the accidents. Wayde Schafer, North Dakota spokesman for the Sierra Club, said, “As if we needed another wake-up call after Quebec, here’s another wake-up call.” A writer at the Daily Kos opined that the accident was “just another reminder that fossil fuels are not safe for children, train drivers and other living things,” also wrongly reporting that one worker on the Casselton train had suffered second-degree burns. (Sgt. Tara Morris of the Cass County sheriff’s office toldNational Review Online that was inaccurate.) Even more hysterically, Esquire’s Charles P. Pierce claimed:

This is the kind of thing that happens when you commit to becoming a petro-state. You come to realize quite soon that the petro becomes the state, and that the other parts of the state — like, say, the people who live there, or the land they live on — ultimately become expendable. The only thing that truly matters is the product, digging it out of the ground and getting it somewhere you can sell it.

Interesting enough, similar criticism arose after the Lac-Mégantic tragedy — but when a train carrying 2 million gallons of ethanol derailed in Illinois in 2009, killing one woman, few hastened to blame that energy source.

While it’s true that the oil out of North Dakota’s Bakken region may be more flammable than heavy crude oil (as the federal government cautioned somewhat obviously in a safety alert last week), blaming it for a train accident is “like blaming a car accident on the fact that there were groceries in the car,” Elana Shor, a reporter for Environment & Energy Publishing, recently observed.

It makes sense to focus these safety measures especially on the rail industry. As the American energy sector has boomed, railways have found a profitable opportunity. In 2012 alone, trains carried more than 34 million barrels of crude oil in the United States. And between 2009 and 2012, petroleum-related train traffic in America increased by 2,027 percent, up to 234,000 cars a year.

Similar accidents could also be prevented by constructing additional pipelines. To be sure, there’s a trade-off involved; while pipelines are less likely to spawn Casselton-like infernos, they’re also prone to bigger leaks because of the volume of oil they transport.

But those who unconditionally hate oil are unlikely to engage in such a rational cost-benefit analysis. Likewise, for them, it doesn’t matter that green-friendly ethanol also has explosive potential on American railroads; it doesn’t matter that the boom in natural gas and oil has contributed mightily to the American economy; and it doesn’t matter that further regulatory precautions could make energy transportation safer.

Unfortunately, their absolutist alarmism could eclipse policy proposals that may actually be helpful in preventing another disaster. Unlike Casselton, the next city may not have such a providential outcome.

— Jillian Kay Melchior is a Thomas L. Rhodes Fellow for the Franklin Center for Government and Public Integrity and a senior fellow for the Independent Women’s Forum.