TORONTO — Two people were killed and 13 others were injured after a man with a handgun opened fire on a bustling avenue in Toronto on Sunday night, the police said. The suspect was later found dead.

Officers confronted the suspect, who was identified only as a 29-year-old man from the Toronto area, on a nearby street and exchanged gunfire with him, the authorities said. The suspect ran from the police and was found dead with a gunshot wound on a street.

John Tory, the mayor of Toronto, said at a City Council meeting on Monday that the shooting, part of a recent surge in gun violence in the city, was a “cowardly act” and “an attack on our city itself.”

“I’ve said for some time that the city has a gun problem,” he said. “Guns are far too readily available to far too many people.”