Six people were killed and eight wounded when gunmen opened fire at a Quebec mosque during Sunday night prayers, in what Canadian Prime Minister Justin Trudeau called a "terrorist attack on Muslims".
Police said two suspects had been arrested, but gave details about them or what prompted the attack.
Initially, the mosque president said five people were killed and a witness said up to three gunmen had fired on about 40 people inside the Quebec City Islamic Cultural Centre. Police said only two people were involved in the attack.
"Six people are confirmed dead - they range in age from 35 to about 70," Quebec provincial police spokeswoman Christine Coulombe told reporters, adding eight people were wounded and 39 were unharmed.
The mosque's president, Mohamed Yangui, who was not inside when the shooting occurred, said he got frantic calls from people at evening prayers.
"Why is this happening here? This is barbaric," he said.
Canadian Prime Minister Justin Trudeau said in a statement: "We condemn this terrorist attack on Muslims in a centre of worship and refuge."
He contined: "Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, cities and country."
The shooting came on the weekend that Trudeau said Canada would welcome refugees, after US President Donald Trump suspended the US refugee programme and temporarily barred citizens from seven Muslim-majority countries from entering the US on national security grounds.
A Canadian federal Liberal legislator, Greg Fergus, tweeted: "This is an act of terrorism - the result of years of sermonising Muslims. Words matter and hateful speeches have consequences!"
New York Mayor Bill de Blasio said police were providing additional protection for mosques in that city following the Quebec shooting.
"All New Yorkers should be vigilant. If you see something, say something," he tweeted.
'Not safe here'
Like France, Quebec has struggled at times to reconcile its secular identity with a rising Muslim population, many of them from North Africa.
In June last year, an animal's head was left on the doorstep of the cultural centre.
"We are not safe here," said Mohammed Oudghiri, who normally attends prayers at the mosque in the middle-class, residential area, but did not on Sunday.
Oudghiri said he had lived in Quebec for 42 years but was now "very worried" and thinking of moving back to Morocco.
Mass shootings are rare in Canada, which has stricter gun laws than the United States, and news of the shooting sent a shockwave through mosques and community centres throughout the mostly French-language province.
"It's a sad day for all Quebecers and Canadians to see a terrorist attack happen in peaceful Quebec City," said Mohamed Yacoub, co-chairman of an Islamic community centre in a Montreal suburb.
"I hope it's an isolated incident."
In the neighbouring province of Ontario, a mosque was set on fire in 2015, a day after an attack by gunmen and suicide bombers in Paris.
Zebida Bendjeddou, who left the Quebec City mosque earlier on Sunday evening, said the centre had received threats.
Bendjeddou said she had not confirmed the names of those killed, but added: "They're people we know, for sure. People we knew since they were little kids."