A white university student is the sole suspect in a mass shooting at a Quebec City Mosque that killed six people during evening prayers.
A man, believed to be of Moroccan descent, arrested at the scene has been released and is now considered a witness.
Alexandre Bissonnette, a 27-year-old French-Canadian man, was arrested alongside Mohamed el Khadir on Sunday night after the shooting at the Islamic Cultural Centre.
Bissonnette was nabbed about 24km from the scene after reportedly calling police to say he was armed but ready to surrender.
El Khadir, believed to be of Moroccan descent, is no longer considered a suspect.
Police arrested two suspects, including one who called 911 to say he was armed but ready to give himself up.
More than 50 people were at the Quebec Islamic Cultural Centre when the shooting erupted on Sunday night.
In addition to the six who died, five were in critical condition and 12 others suffered minor injuries, University of Quebec Hospital Centre spokeswoman Genevieve Dupuis said on Monday. The dead ranged in age from age 35 to 65.
Police said they did not believe there were other suspects but were investigating. Police didn't give a possible motive but said Bissonnette had no prior police records.
Prime Minister Justin Trudeau and Quebec Premier Philippe Couillard both characterised the attack as a terrorist act, which came amid heightened tensions worldwide over President Donald Trump's travel ban on several Muslim countries.
"We condemn this terrorist attack on Muslims in a centre of worship and refuge," Trudeau said in a statement.
"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.
"Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, cities and country," he said.
Canada is generally very welcoming toward immigrants and all religions, but the French-speaking province of Quebec has had a long-simmering debate about race and religious accommodation. The previous separatist government of the province called for a ban on ostentatious religious symbols such as the hijab in public institutions.
In the summer of 2016 a pig's head was left on the doorstep of the Quebec Islamic Cultural Centre in the middle of Ramadan, when Muslims fast from dawn to sunset. Practising Muslims do not eat pork.
"The Muslim community was the target of this murderous attack," Couillard said at an early morning news conference. He said solidarity rallies would be held across Quebec on Monday.
Quebec City Mayor Regis Labeaume, appearing shaken, said, "No person should have to pay with their life, for their race, their colour, their sexual orientation or their religious beliefs."
Cultural Centre President Mohamed Yangui said the shooting in occurred in the men's section of the mosque. He said he wasn't at the centre when the attack occurred, but he got some details from people on the scene.
Ali Hamadi said he left the mosque a few minutes before the shooting and said a friend, Abdelkrim Hassen was killed. He said Hassen, who worked in information technology for the government, had three daughters and a wife, whom he had to notify of the death.
Quebec City police spokesman Constable Pierre Poirier said the mosque had been evacuated and the situation was under control.
Trudeau had earlier reacted to Trump's visa ban for people from some Muslim-majority countries by tweeting on Saturday: "To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith. Diversity is our strength #WelcomeToCanada."
Trudeau also posted a picture of himself greeting a Syrian child at Toronto's airport in late 2015. Trudeau oversaw the arrival of more than 39,000 Syrian refugees soon after he was elected.
The mayor of Gatineau, Quebec, near Canada's capital of Ottawa, said there would be an increased police presence at mosques around his city following the attack.
The New York Police Department also said it was stepping up patrols at mosques and other houses of worship.
"NYPD is providing additional protection for mosques in the city. All New Yorkers should be vigilant. If you see something, say something," New York City Mayor Bill de Blasio said on Twitter.
"Our prayers tonight are with the people of Quebec City as they deal with a terrible attack on a mosque. We must stand together," de Blasio said in another tweet.
Canada's public safety minister, Ralph Goodale, said on Twitter on Sunday that he was deeply saddened by the loss of life. His office said no motive had been confirmed.
Francois Deschamps, an organiser of a refugee-support group in Quebec City, said the motive for Sunday's attack was unknown, but right-wing groups are very organised in Quebec City, distributing fliers at the university and plastering stickers around town.
Deschamps said he has received death threats after starting a refugee support group on Facebook and people have posted his address online.
"I'm not very surprised about the event," Deschamps said.
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."
Associated Press writer Sean Farrell in Montreal contributed to this report. Rob Gillies reported from Toronto.