A gunman dressed all in black opened fire on a busy Toronto street, leaving two people dead and another 12 injured - including a young girl.
The 29-year-old attacker also died following the rampage in the Canadian city's Greektown district on Sunday night.
A video from one witness shows a man dressed in black clothes and a black hat walking quickly and firing three shots from the pavement into at least one restaurant. Witnesses described hearing about 20 shots and the sound of a weapon being reloaded several times.
Police said it was too early to provide a motive for the shooting, but local councillor Paula Fletcher said: "It's not gang related. It looks like someone who is very disturbed."
Toronto police said 12 people were being treated in hospital, including a nine-year-old girl who was in a critical condition, while a woman and a second person died from their wounds.
The gunman, who used a handgun in the attack, died after an exchange of gunfire with police near Danforth and Pape avenues at around 10pm.
Monica Hudon, a spokeswoman for the province's Special Investigations Unit, said officers found the suspect about three streets away from the scene and exchanged fire. She said the man fled and was then found dead back in Danforth Avenue.
It was not immediately clear if the man killed himself or died of injuries after being shot by police.
Paramedics, firefighters and police had converged on the shooting in Toronto's east end, which has many popular restaurants, cafes and shops.
"We are looking at all possible motives... and not closing any doors," Toronto Police Chief Mark Saunders said at the site of the shooting.
Jody Steinhauer was at Christina's restaurant with her family when she heard what sounded like 10 to 15 blasts of "firecrackers".
"We started to hear people scream out front," Steinhauer told CBC News, adding they were told to stay in the restaurant.
Witness John Tulloch said he and his brother had just got out of their car when he heard up to 30 gunshots.
"We just ran. We saw people starting to run so we just ran," he said.
Ontario Premier Doug Ford tweeted a message of solidarity to the victims.
My heart goes out to the victims and loved ones of the horrific act of gun violence in Toronto. Thank you to all the first responders for acting quickly to help everyone affected.— Doug Ford (@fordnation) July 23, 2018
The incident comes amid a spate of more than 200 shootings in Toronto this year.
About two dozen have been fatal and city officials have blamed the crime surge on gang violence.
But Toronto Councillor Paula Fletcher told CP24 she heard the gunman in Sunday's attack was "emotionally disturbed".
"It's not gang related. It looks like someone who is very disturbed," Ms Fletcher said.
Mayor John Tory said the latest attack was "evidence of a gun problem" in Toronto.
"Guns are too readily available to too many people," Mr Tory said during a news conference two hours after the shooting.
Canada traditionally has relatively low levels of gun violence, particularly compared to the United States.
In numbers | US gun violence
"We were so use to living in a city where these things didn't happen," Mr Tory said. "But there are things that happen nowadays and they are just unspeakable."
Over the weekend, Toronto police deployed dozens of additional officers to deal with the recent rise in gun violence.