Federal Transport Minister Marc Garneau says he wants to know what caused a derailment in Toronto that saw two CP Rail trains travelling in opposite directions sideswipe one another Sunday, causing several hundred litres of fuel to spill in Toronto's Annex neighbourhood.

The Transportation Safety Board of Canada is still investigating the cause of the collision, which appears to have occurred near a rail crossover just after 5 a.m. in the area of Howland Avenue and Dupont Street near Bathurst Street. It's there that a westbound freight train clipped the last three cars of a second train that was headed eastbound, causing the cars to lean over.

"It's regrettable that this incident occurred today," Garneau told reporters Sunday at a federal cabinet retreat in Sudbury, Ont.

"I want to learn more about what caused it and certainly, if there are things we need to do, we will do them," he said. He added that the government recently put measures in place including speed restrictions, rules to immobilize trains when they are unattended, and a requirement to inform first responders in municipalities about what kind of materials are being transported through neighbourhoods.

The measures were put into effect as part of a "protective directive," Garneau said, which built on rail safety rules implemented following the 2013 derailment in Lac-Mégantic, Que., where a train carrying oil tankers exploded, leaving 47 people dead.

Two freight trains collided in Toronto early Sunday, causing cars to derail. One of the train's engines leaked diesel fuel but crews have contained the leak. (CBC )

"It doesn't matter where it happens — it shouldn't happen," Garneau said.

Canadian Pacific Railway said Sunday that human error may be to blame.

"If any disciplinary action is required, it will not be implemented until the investigation is concluded," Martin Cej, assistant vice-president of public affairs and communications for Calgary-based CP, told CBC News.

The three final cars on the eastbound train — the ones that were sideswiped — were carrying small quantities of dangerous goods including batteries, alcoholic beverages, aerosol containers and non-flammable gases under pressure, TSB spokesman Chris Krepski said. None of those goods were released during the collision, he said.

But more than 1,100 litres of diesel fuel did leak from one of the westbound train's engines, Toronto Fire Capt. Michael Westwood said.

'My whole house shook'

"We heard this huge bang and then my whole house shook," said nearby resident Astrid Jull, who said she's long wondered if a derailment could occur at the location.

"I never thought it would actually happen in front of our house."

Canadian Pacific Railway says one freight train hit the tail end of the other and it appears that they were going in different directions when they hit. (Arlyn Mcadorey)

"It was like a rolling sound that crescendoed into an explosion," another nearby resident, who goes by the name D!ONNE Renée, said. Renée, a former Toronto mayoral candidate, has been campaigning for rail safety changes near her home for some time.

"I then looked out my window and saw that red plumage of fire and smoke."

Krepski confirmed the derailment caused a small fire that was put out by crews with a fire extinguisher.

By 9 a.m., Cej said the cause of the derailment was not a mechanical one.

Toronto Fire Services said it was concerned that some of the derailed cars might tip over. (Turgut Yeter/CBC)

​"Early indications are the incident is a result of human error. It was not a signalling or equipment malfunction," Cej said.

By 6 p.m., he also ruled out speed as a factor in the crash.

Mandate not to lay blame, TSB says

Krepski wouldn't confirm whether human error played a role, saying it isn't the TSB's mandate to lay blame and that it's too soon to know how the collision unfolded.

Toronto Fire Services said the diesel leak caused by the derailment had been contained. The fuel did not get into storm sewers or waterways and there was no threat to public safety. Fire crews poured absorbent material onto the spill.

Earlier Sunday, before the TSB said there were dangerous materials in some of the train cars affected by the derailment, CP's Cej had said there were no injuries and no dangerous goods involved.

'No public safety concerns'

"There are no public safety concerns," he said.

The Transportation Safety Board of Canada is investigating the derailment. Its spokesperson said it appears one train sideswiped another. (Arlyn Mcadorey)

"CP takes this issue extremely seriously. We immediately enacted all of our emergency response processes to deploy teams and assets to the site. Right now, the incident is under investigation."

Const. Victor Kwong, spokesman for the Toronto police, said Bartlett Avenue north of Dupont Street was closed to all traffic but emergency vehicles.

Look closer- see how the ties have pulled away in the earth because of the impact on the derailment.<a href="https://twitter.com/hashtag/railsafety?src=hash">#railsafety</a> <a href="https://t.co/uV5VPJO748">pic.twitter.com/uV5VPJO748</a> —@OnElectionDay