The police officer who shot homeless man Alain Magloire last year, took the stand this morning during a coroner's inquest into the death of a mentally disturbed man.

Constable Mathieu Brassard told the inquiry that his life, and that of his partner, were in danger during the confrontation.

Brassard testified that he had his gun drawn, just like his colleagues, and was ready to shoot because Magloire was approaching in their direction with the hammer and he was refusing to step back.

A police patrol car arrived just as Brassard was about to shoot and destabilized Magloire, who jumped on the hood.

Brassard said he thought Magloire would be under control and he was about to put the gun back in the holster. But Magloire got back on his feet, lifted his hammer and was ready to hit Brassard’s partner.

That's when Brassard aimed again, and pulled the trigger.

He told the court that he was convinced his partner's life was in danger, and that he had to shoot Magloire.

During cross-examination, the lawyers for the family wanted to know if the police officers talked to each other to corroborate their stories.

Of the four police officers involved in the shooting testified so far, three said they wrote their statement on their own, without talking to each other or exchanging notes.

Brassard says he did speak to his partner before writing his report, but insists he did not to try to corroborate his version of events.

Brassard did have to admit that there were contradictions between what he wrote and what was seen on the videos.

A public inquest began Monday into the death of Magloire, who was shot and killed Feb. 3, 2014.

The coroner’s inquest is trying to determine why the father of two, who suffered from serious mental health issues, was shot four times by police in downtown Montreal. The officers were never charged.

The coroner will seek to determine how it happened and look to prevent any similar incidents in the future.

The incident began when Magloire got in an argument at a youth hostel on St-Hubert St. near Berri St. and used a hammer to smash the window at the reception desk.

When police arrived, they caught up with him in front of the bus terminal on Berri, where he waved the hammer at them. They called for an officer equipped with a Taser, but it didn’t arrive soon enough.

Before the Taser could be used, Magloire began running toward the officers.

A patroller stopped him by running him over with his cruiser. Magloire got up and lunged toward an officer.

That's when he was shot with four bullets. Magloire died on location.

An investigation by Surete du Quebec police concluded no excessive force was used in the shooting.

Magloire was a father of two, had a Master’s degree in biochemistry and used to work with children with disabilities. He also suffered from mental illness.

His brother, Pierre Magloire told CTV on Monday that, “As a society, we’re expecting a change. Everyone’s talking about it; everyone’s looking for something to change.”

The public hearings are expected to last until Jan. 22.