Police have released the identity of a man who died Friday after he was shot by a Montreal police officer.

Farshad Mohammadi, 34, was identified through fingerprints. He wasn’t carrying identification at the time of the confrontation at the Bonaventure metro station, according to Quebec provincial police.

Mohammadi was homeless and had been living out of shelters.

Provincial police, who are investigating the shooting, said Mohammadi attacked one of the two responding officers with an edged weapon and one of the officers then shot the suspect.

A police officer was treated for cuts to his neck and torso.

Mohammadi died in hospital. The officer’s injuries are not considered life-threatening.

The incident happened just before 1:40 p.m. at the downtown station.

A witness who was near the ticket window said he saw two police officers take out their weapons, a gun and a baton.

They allegedly shouted for the suspect to stop, but he refused and started to run.

The witness said he heard three shots after the officers and the suspect turned a corner.

Several other witnesses said the man refused to stop after several demands from police.

Staff and clients at the Maison du Père shelter in Montreal said Mohammadi spent Christmas and New Year's there.

They said he had immigrated from Iran and had been using the shelter's services since 2008. He was reserved and did not speak French, said France Desjardins of Maison du Père.

"Somebody was asking me if he had problems with mental illness. It's difficult for us to assess because he was not engaging in any dialogue with us," she said.

"He was not somebody to ask for more help."