A RUNAWAY train carrying crude oil derailed and exploded in the Quebec town of Lac-Mégantic in the early hours of July 6th, creating a fireball that flattened dozens of buildings and left 50 people missing or dead. The centre of the small tourist town, which lies just west of Maine, looked like “a war zone”, said Stephen Harper, the prime minister.

The 72-car train, bound for a refinery in New Brunswick, had been parked a few miles west of the town and left unattended when its engineer retired for the night. Rail World, the Chicago-based owner of the Montreal, Maine and Atlantic Railway, initially blamed firefighters for releasing the air brakes when tackling an earlier blaze, but later said an employee had failed to set the handbrakes. Police have started a criminal investigation, but have ruled out terrorism.

The transport of oil by rail has rocketed with the discovery of shale fields far from pipelines. In 2009 only 500 carloads of oil were moved by rail in Canada; the projected total this year is 140,000. The International Energy Agency says the risk of spills is six times higher by train than by pipeline. (Pipeline spills tend to be bigger, but even considering only spills of more than five gallons, trains are twice as risky.)

Even as traffic of oil has risen, the public rail-safety budget has fallen, to C$34m ($32m) this year from C$43m in 2009. Demand for tanker cars has made rail companies reluctant to replace their older stock, though their walls puncture more easily than those of modern cars.

The disaster will lead to debate about the building of new pipelines. Canada is waiting for the United States to approve the Keystone XL pipeline, which would link Alberta to Texas. Another is proposed in British Columbia, to the horror of greens. The Lac-Mégantic tragedy—which, if the missing are indeed dead, will be Canada’s worst train disaster in 149 years—may make the opponents of pipelines think again.