With a Canadian Pacific Railway train derailed near the core of flood-battered Calgary, Mayor Naheed Nenshi is picking a fight with the railway over its safety record, while saying cities should push for more power over the industrial goods running by their backyards.

The derailment and partial bridge collapse Thursday morning – triggered by surging flood waters, CP said – left six train cars containing petroleum products hanging precariously over Calgary’s Bow River, forcing the diversion of emergency crews from the city’s flood-recovery efforts and shutting down a water-treatment plant and a major freeway.

Even in a state of emergency, Calgary wasn’t able to inspect CP’s 101-year-old bridge. Mr. Nenshi thinks that should change.

“How is it we don’t have regulatory authority over this, but it’s my guys down there risking their lives to fix it?” the mayor said, as Calgary fire crews worked to keep the train cars stable. “We have to have a serious conversation about this. This is a private business, and private businesses are subject to regulation.”

Mr. Nenshi said it is a “constant frustration” for mayors across Canada that the rail industry answers only to the federal government.

Calgary’s current predicament underlines a challenge facing other municipalities, where railway lines cut through the downtown core, leaving local officials little control over schedules, noise, the loads they carry – or the dangers they pose.

Mr. Nenshi wants to push for cities to have more power over railways running through their communities.

That volley sparked a surprise visit from CP chief executive officer Hunter Harrison, who said Thursday’s derailment was unforeseen and suggested closing the bridge indefinitely after the flood as a precaution would cost money.

“We didn’t anticipate a problem like this occurring at all. And how long was that going to be? We’re jeopardizing commerce as it speaks,” Mr. Harrison said. “This is a pretty extraordinary occurrence, just like the rains and the flooding here.”

Unlike city bridges, the rail bridge is not built on bedrock. Mr. Harrison said a pier supporting the bridge had its foundation washed away by the Bow River, which surged last week and flooded low-lying parts of the city. That pier twisted and eventually snapped under the weight of the train, he said.

The train derailed at roughly 3:30 a.m. local time, at a speed of 14 km/h and when most cars had already crossed the central Calgary bridge. The train stopped and crews called 911.

The derailment left six cars upright, connected and sagging as the bridge slumped toward the water – two feet over the first 90 minutes – before stabilizing.

Five of the six cars were carrying flammable petroleum products, including diluent, which waters down oil-sands bitumen for shipping. Crews feared the worst – not only that the train cars could fall and spill their oily contents, but also float down the river and damage other bridges.

Crews strung a thick cable through the six cars before chaining them to another nearby train that served as an anchor. That’s where it was left Thursday evening, as crews slowly emptied the contents of the cars. The bridge “has not moved further so we think it’s relatively stable at this point,” Acting Fire Chief Ken Uzeloc said Thursday afternoon.

CP also owns a newer bridge, built in 1969, immediately next to the one that partly collapsed. It uses a different type of foundation, and Mr. Harrison hopes to resume shipment along it shortly.

Mr. Nenshi noted a series of recent CP layoffs, asking: “How many bridge inspectors did they fire?”

Mr. Harrison said none.

CP has had other derailments in Alberta, Ontario and Minnesota in the past three months. Mr. Harrison acknowledged those incidents, but said the Calgary derailment is “highly, highly, highly unusual.”

The Transportation Safety Board will investigate the derailment. Transport Minister Denis Lebel sent an inspector to the site and will await the TSB report.“Should any deficiencies be identified, we will not hesitate to take appropriate action,” he said.