Witness footage has emerged of a man who fired a handgun into restaurants and cafes as he walked along a street in Toronto.

Two people were killed and 12 others were injured, including a young girl, in the Canadian city’s Greektown neighbourhood.

The young girl was in a critical condition, Toronto’s police chief, Mark Saunders, said.

The attacker died after an exchange of gunfire with police.

Video from the scene shows a man dressed in black clothes and a black hat walking quickly before firing three shots from the pavement into a shop or restaurant.

Mr Saunders said the shooting was not random and he did not rule out terrorism as a motive.

“We are looking at all possible motives... and not closing any doors,” he told reporters at the site of the shooting.

Police taped off the scene near the mass shooting in Toronto (REUTERS/Chris Helgren)

Toronto Councillor Paula Fletcher told CP24 she heard that the gunman was emotionally disturbed.

“It’s not gang related. It looks like someone who is very disturbed,” Ms Fletcher said.

Councillor Mary Fragedakis also said she heard the gunman was disturbed.

Ms Fletcher said for this to happen in an area where families gather for dinner is a tragedy.

Mass shootings are rare in Canada’s largest city.

Police officers walk the scene at Danforth Street at the scene of a shooting in Toronto, Ontario (COLE BURSTON/AFP/Getty Images)

“We were so used to living in a city where these things didn’t happen,” Toronto Mayor John Tory said. “But there are things that happen nowadays and they are just unspeakable.”

This past weekend, Toronto police deployed dozens of additional officers to deal with a recent spike in gun violence in the city. Mr Tory said the city has a gun problem.

“Guns are too readily available to too many people,” Mr Tory said.