The 27-year-old suspect in a terrorist attack against Muslims at Quebec City during evening prayers was charged on Monday with six counts of first degree murder and five counts of attempted murder.
The massacre on Sunday evening, which Canadian prime minister Justin Trudeau condemned as a “cowardly terrorist attack on Muslims”, left five others in critical condition.
A further 12 worshippers managed to escape the chaos with minor injuries.
Police initially arrested two men but later said just one, Alexandre Bissonnette, remained a suspect.
A second person held in connection with the shooting was later described as a witness. One man was arrested at the scene and a second man held after he called 911, police said.
A handgun and at least two assault rifles were also recovered, according to Canadian media reports.
Bissonnette is a French-Canadian student, according to local news website TVA, which cited police sources. A Facebook page reportedly belonging to Bissonnette included “likes” for Donald Trump and Marine Le Pen, the far-right French presidential candidate.
The suspect has made a brief court appearance at which he did not enter a plea. He stared at his feet and fidgeted during the hearing as he appeared in a white prisoner jumpsuit. His next court date is February 21.
A Quebec police spokesman said the suspect’s motive was unclear and that there was “no indication” that anyone else was involved in the attack.
Canada is generally welcoming towards immigrants and refugees, but tensions have been simmering in Francophone Quebec over attitudes towards Islam.
Last year, a pig’s head was left on the doorstep of the mosque that was attacked on Sunday during ramadam, when Muslims fast from dawn to sunset. Practicing Muslims do not eat pork.
In 2013, police investigated after a mosque in the Saguenay region of Québec was smeared with what was believed to be pig’s blood.
In the neighboring province of Ontario, a mosque was set on fire in 2015, a day after the infamous Paris terror attacks in November.
Mohamed Yangui, the president of the mosque, said he began receiving panicked phone calls when the shooting began. He was not inside the mosque at the time.
Up to a hundred worshippers had been inside the mosque, and there were fears on Monday that several children could be among the injured.
“Why is this happening here? This is barbaric…we are sad for the families,” he said.
“We condemn this terrorist attack on Muslims in a centre of worship and refuge,” said Mr Trudeau in a statement following the shooting.
“While authorities are still investigating and details continue to be confirmed, it is heart-wrenching to see such senseless violence.
“Diversity is our strength, and religious tolerance is a value that we, as Canadians, hold dear.”
Quebec Premier Philippe Couillard said: “The Muslim community was the target of this murderous attack.”
The Canadian Council of Imams said in a statement that “Islamophobia has killed innocent Canadians.”
“We ask all decent people to stand against hatred of Islam and Muslims in any forum,” the statement read.
“Our message to anyone in the Canadian Muslim community who may experience Islamophobia is not to suffer in silence.”
Mass shootings in Canada are less common than in the United States, though the attack on the mosque marks the fourth mass shooting to take place since 2014.
Two men and a woman were killed with a crossbow last August in Toronto, while in January 2016 a mass shooting in La Loche, Saskatchewan left four dead and seven injured.
In 2014, a 53-year-old man shot dead eight of his relatives in Edmonton before taking his own life.