A Toronto teacher who was gunned down early on Tuesday morning had just stepped out to move his car when he was fatally wounded.

Abshir Hassan, a 31-year-old substitute teacher, had been hosting friends at his apartment when he left to move his car and was shot with two others – a 22-year-old man and an 18-year-old woman – outside the apartment building where he lived, near Allen Road and Lawrence Avenue, according to a source.

Mr. Hassan died in hospital, and the man and woman were in critical condition on Wednesday.

Story continues below advertisement

A close friend, Mohamed Ahmed, said he did not believe the shots were intended for Mr. Hassan, who had never been in trouble with the law.

"I know for a fact he's not targeted because I think the people who shot him don't really know who he is. I think it was just one of those random shootings."

Mr. Hassan immigrated from Somalia as a child and grew up in the Lawrence Heights neighbourhood, according to Mr. Ahmed. He was just over a month away from earning his Master's degree in education from York University, and was writing his thesis on issues facing the Somali community, he said.

David Debelle, the principal at Lawrence Heights Middle School, where Mr. Hassan often worked, struggled through tears to describe a young man who volunteered his time to his students, leading games of pick-up basketball at lunch time and deejay lessons after school.

Story continues below advertisement

"Growing up in the Lawrence Heights neighbourhood, which is a marginalized community, he appreciated the challenges that many students experienced," he said. "If any student had a problem, needed someone to talk to, he was a kind, caring adult who would lend an ear."

He said social workers were at the school to support students and about 20 teachers who showed up to mourn the loss of Mr. Hassan, who also taught and volunteered at other schools in the area, including Flemington Public School, Charles H Best Middle School and John Polanyi Collegiate Institute.

Mr. Hassan also volunteered his time to Success Beyond Limits, a community youth organization based in the Jane and Finch area. He participated in the group's Hip Hop Literacy program, Somali Student Achievement Task Force, and accompanied some of the youth to a Raptors game.

The Lawrence Heights neighbourhood has seen more than its share of violence in recent years, including two random shootings in which one man was killed at a playground and another was shot while walking his dog.

Story continues below advertisement

Stella Laughlin, a long-time resident of the building where the shooting took place, said she woke up to the sound of gunshots and heard a commotion in the hallway outside her door.

"I got scared. I was wondering what was going on," she said.

Police say officers patrolling the area heard several gunshots just after midnight, and found the three victims outside a low-rise apartment building on Flemington Road. They believe the two younger victims are a couple.

Investigators have not ruled out the possibility there was more than one shooter.

Story continues below advertisement

Inspector Tim Crone called the shooting a "brazen and cowardly act."

With a report from the Canadian Press