A 29-year-old who shot dead six worshippers at a Quebec City mosque in the worst anti-Muslim attack in the West got life in prison on Friday.

Alexandre Bissonnette will have to wait 40 years longer than usual before he can apply for parole.

In his decision, Judge Francois Huot rejected a prosecution request for a 150-year sentence, which would have been the longest ever in Canada, saying “subjecting a murder to a sentence that exceeds his life expectancy” would be a cruel and unusual punishment under Canadian law.

But he also noted the killer’s “visceral hatred of Muslim immigrants.”

“You killed six of your compatriots whose only crime was to be different than yourself,” Huot said in court.

“With your hatred and racism, you’ve ruined their lives, yours and your parents’, and the crime you’ve done deserves the greatest denunciation,” he said.

A university student at the time of the shooting, Bissonnette appeared to have been seduced by nationalist and supremacist ideologies into committing this “unjustified and deadly” massacre that sought to “undermine our fundamental societal values,” the judge said.

The attack at the Quebec Islamic Cultural Centre in the quiet Sainte-Foy neighborhood of Canada’s oldest city, he concluded, will go down in Canadian history “written in blood” as one of the country’s worst tragedies.

As the 246-page verdict was read over a six-hour period, Bissonnette sat quietly in the packed courtroom, gazing at his feet while his parents and several friends and family of the victims wiped tears from their eyes.

‘Like playing a video game’

On January 29, 2017, Bissonnette burst into the Quebec City mosque and unleashed a hail of bullets on the 40 men and four children who were chatting among themselves after evening prayers.

Security video footage showed a cold-blooded killer strategically and methodically firing dozens of shots, retreating to a safe area to reload his nine-millimeter pistol at least four times, “like he was playing a video game,” recounted one witness.

Six men were killed and five were seriously injured.

The victims were all dual nationals who emigrated to Canada over recent decades: two Algerians, two Guineans, a Moroccan and a Tunisian.

They were a scholar, a butcher, a daycare operator, a food industry worker, a public servant and a computer programmer all connected by faith.

Introverted and educated, Bissonnette had been described after his arrest as a white supremacist opposed to Muslim immigration but not affiliated with any group.

(AFP)