Eight teenage girls, including three 13-year-olds, have been charged with murder in the stabbing death of a 59-year-old man in downtown Toronto, police said Tuesday, one of the latest and most troubling episodes of violence in Canada’s largest city.

The victim, who was yet to be identified, had been living in a homeless shelter since the fall, police said. He did not appear to know the suspects and may have been attacked over a liquor bottle he was carrying, according to The Globe and Mail newspaper.

The girls had made contact with one another on social media before meeting in person, possibly for the first time Saturday evening, police said, adding that they came from various parts of the city and did not appear to form a gang.

“We don’t know how or why they met on that evening and why the destination was downtown Toronto,” Sgt. Terry Browne of the Toronto Police Service said in a news conference Tuesday. “We don’t know how long they’ve been acquainted together.”

News of the killing emerged a day after five people were gunned down inside a high-rise condominium building outside Toronto by a 73-year-old resident with long-held grievances against members of the condo board. The separate killings in the space of a couple of days come as crime and violence have been rising in Toronto.

Just after midnight Saturday, police responded to reports of a wounded man in downtown Toronto, authorities said. The man was taken to the hospital, but died there shortly afterward from his stab wounds.

The group of girls — which also included three 14-year-olds and two 16-year-olds — had been involved in another altercation involving “criminal behavior’’ before encountering the 59-year-old man, Browne said.

Three of the girls had “prior contact” with the police, according to authorities.