Investigators are digging into the life of a 29-year-old man to find out what prompted him to fire a handgun into restaurants and cafes in a lively Toronto area, killing a 10-year-old girl and an 18-year-old woman and wounding 13 others.

The family of Faisal Hussain, who died during an exchange of gunfire with police, said he had long suffered from psychosis and depression, but they had never imagined this would be his fate.

It is not yet clear whether Hussain took his own life or was killed by police during the rampage on Sunday night. Ontario’s police watchdog said there was an exchange of shots between the attacker and two officers on a side street before the gunman was found dead.

A memorial to Reese Fallon
A memorial to Reese Fallon (AP)

The mass shooting in the Greektown district came just three months after a man used a van to plough through pedestrians on a pavement in another Toronto district, killing 10 people and injuring 14 in an attack apparently aimed at women.

A statement from Hussain’s relatives said he had lifelong “severe mental health challenges”. They said medication did not help him and the interventions of professionals were unsuccessful.

His family said: “While we did our best to seek help for him throughout his life of struggle and pain, we could never imagine that this would be his devastating and destructive end.

A vigil for the shooting victims
People comfort each other following a vigil near the scene of the shooting in Greektown (AP)

“Our hearts are in pieces for the victims and for our city as we all come to grips with this terrible tragedy. We will mourn those who were lost for the rest of our lives.”

Investigators searched the low income east end apartment that Hussain shared with his parents and siblings on Thorncliffe Park Drive in the east end of the city.

Police chief Mark Saunders said he would not speculate on a motive but did not rule out terrorism.

“We do not know why this has happened yet,” he said. “It’s going to take some time.”

The 18-year-old woman who was killed was identified as Reese Fallon, a recent high school graduate who volunteered for Canada’s Liberal party and was due to attend McMaster University in the autumn. Her family said in a statement they were devastated.

“She was … smart, passionate and full of energy. It is a huge loss,” said Nathaniel Erskine-Smith, a Canadian MP who knew Ms Fallon.

Flags at Toronto City Hall and at Ms Fallon’s former high school, Malvern CI, were lowered as a mark of respect.

The school board said: “An engaging student, Reese Fallon graduated from Malvern CI just last month and was highly regarded by staff and loved by her friends.” School chiefs added that support is being offered to students.

The suspected gunman's apartment
An apartment building in Toronto’s Thorncliffe Park where shooting suspect Faisal Hussain lived (AP)

The 13 people who were wounded ranged in age from 10 to 59, and suffered injuries ranging from serious to minor, Chief Saunders said.

Officials did not identify the 10-year-old who was killed or name any of the wounded, who included six women and girls and seven men.

Dr Najma Ahmed of St Michael’s Hospital said five patients were admitted in a serious or critical condition, with three of them undergoing immediate life-saving surgery.