MONTREAL - A Montreal police officer says he was outnumbered and had a man clawing for his gun when he made the crucial decision to fire shots that killed a teenager and wounded two other people in 2008.

Jean-Loup Lapointe was testifying Wednesday before a packed courtroom at the coroner's inquest looking into the slaying of Fredy Villanueva.

Lapointe described being swarmed by four people and being assaulted by Fredy's brother, Dany Villanueva, after being unable to handcuff him.

With backup nowhere in sight and his partner unable to help him, he decided his firearm would need to be protected at all costs.

"At that point, I saw no other alternative but to fire," Lapointe said.

"If I lose my weapon, it's over. If I'm disarmed, I'm leaving my life and my partner's life up to fate."

Lapointe gave his testimony as more members of the public than usual attended the hearing into the shooting, which sparked a night of rioting and looting in the Montreal-North district.

A few dozen spectators sat in the crowd wearing white T-shirts bearing pictures of the slain 18-year-old but Judge Andre Perreault, who is overseeing the inquiry, said he didn't see the clothing as a form of intimidation.

However, Perreault did order a recess during Lapointe's testimony and called for calm as the officer recounted his side of the shooting.

Perreault asked people in the packed, oversized courtroom to respect Lapointe's right to testify after his version of events received grumbling and quiet guffaws.

Lapointe said he'd happened upon an illegal dice game during a routine patrol in a park on Aug. 9, 2008, a municipal law violation that warranted a fine.

Lapointe said Dany Villanueva became belligerent when he tried to write him a ticket.

"I told him to calm himself," Lapointe said, testifying that Dany Villanueva was physically and verbally abusive and eventually began striking both Lapointe and his partner, Stephanie Pilotte, as they tried to pin him to the ground.

"I had the impression he wanted to hurt us, not just get away."

Lapointe said he felt more and more cornered as the people with Dany Villanueva, including Fredy Villanueva, advanced on him and ignored his repeated calls to back away.

Lapointe said he repeatedly told the group to back up and that he decided to shoot when he was being strangled and could feel someone reaching for his gun.

"I'm very afraid that they'll get my gun and use it," the constable recounted.

He shot four times but said he was unsure of who he was firing at. Lapointe said he was aiming at the mass of bodies in front of him.

Fredy Villanueva crumpled to the ground, while Denis Meas and Jeffrey Sagor-Metellus were also hit.

Backup soon arrived in the form of firefighters and police.

Lapointe said he tried to tell a superior what happened, but stringing a few sentences together in the immediate aftermath was difficult because he was in a state of shock.

About 20 minutes after the shooting, he found himself in a police car with Pilotte, who began crying. Lapointe said he tried to comfort her.

"I wanted to reassure her," he said.

Lapointe started testifying on Tuesday and said the incident has caused him immense stress: it was the first time he'd fired his weapon in the line of duty.

Outside the courthouse, the Coalition Against Police Brutality held a demonstration during the noon hour, questioning why Lapointe was being so heavily protected.

The officer has special dispensation to carry his service weapon and is followed closely by a police security detail.

An independent provincial police investigation cleared the Montreal police officers and no criminal charges were ever laid in the case.

Lapointe continues his testimony on Thursday.