Six people were killed and eight were injured in a shooting at a Quebec City mosque during evening prayers. Authorities reported two arrests in what Canada's prime minister called an act of terrorism.

Quebec provincial police spokeswoman Christine Coulombe said early Monday that some of the wounded were gravely injured. She said the deceased were approximately 35 to 70 years of age. Thirty-nine people were unharmed. More than 50 were at the mosque at the time of the attack.

One suspect was arrested at the scene and another nearby in d'Orleans, Quebec. Police did not release their names.

Quebec City Islamic Cultural Centre President Mohamed Yangui said the shooting in the provincial capital happened 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. “We are sad for the families,” he said.

Both Prime Minister Justin Trudeau and Quebec Premier Philippe Couillard characterised the attack as a terrorist act, which came amid heightened tensions worldwide over US President Donald Trump's travel ban on certain 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. “Canadian law enforcement agencies will protect the rights of all Canadians, and will make every effort to apprehend the perpetrators of this act and all acts of intolerance.”

Quebec City police spokesman Constable Pierre Poirier said two suspects were arrested. Police said the mosque had been evacuated and things were under control.

Trudeau said on Twitter that he spoke to Quebec's premier and was being briefed by officials. The prime minister said the government had offered “any & all assistance needed.”

Trudeau had earlier reacted to Trump's visa ban for people from certain Muslim-majority countries by tweeting Saturday: “To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith. Diversity is our strength (hash)WelcomeToCanada.”

Trudeau also posted a picture of him 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.

Couillard termed the Sunday mosque attack as “barbaric violence” and expressed solidarity with the victims' families.

The mayor of Gatineau, Quebec, near Canada's capital of Ottawa, said there would be increased police presence at mosques around his city following the attack.

The New York Police Department said it was stepping up patrols at mosques and other hours of worships in its city.

The NYPD issued a statement Sunday night saying Critical Response Command personnel had been “assigned to extended tour coverage” at certain mosques.

“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 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,” Blasio said in another tweet.

Public Safety Minister Ralph Goodale said on Twitter Sunday that he was deeply saddened by the loss of life. His office said no motive had been confirmed.

In the summer of 2016 a pig's head was left on the doorstep of the Quebec Islamic Cultural Centre.

The incident occurred in the middle of Ramadan, when Muslims fast from dawn to sunset. Practising Muslims do not eat pork.

The controversial orders Donald Trump has already issued Show all 9 1 /9 The controversial orders Donald Trump has already issued The controversial orders Donald Trump has already issued Trump and the media White House Press Secretary Sean Spicer takes questions during the daily press briefing Getty Images The controversial orders Donald Trump has already issued Trump and the Trans-Pacific Partnership Union leaders applaud US President Donald Trump for signing an executive order withdrawing the US from the Trans-Pacific Partnership negotiations during a meeting in the Roosevelt Room of the White House in Washington DC. Mr Trump issued a presidential memorandum in January announcing that the US would withdraw from the trade deal Getty The controversial orders Donald Trump has already issued Trump and the Mexico wall A US Border Patrol vehicle sits waiting for illegal immigrants at a fence opening near the US-Mexico border near McAllen, Texas. The number of incoming immigrants has surged ahead of the upcoming Presidential inauguration of Donald Trump, who has pledged to build a wall along the US-Mexico border. A signature campaign promise, Mr Trump outlined his intention to build a border wall on the US-Mexico border days after taking office Getty Images The controversial orders Donald Trump has already issued Trump and abortion US President Donald Trump signs an executive order as Chief of Staff Reince Priebus looks on in the Oval Office of the White House. Mr Trump reinstated a ban on American financial aide being granted to non-governmental organizations that provide abortion counseling, provide abortion referrals, or advocate for abortion access outside of the United States Getty Images The controversial orders Donald Trump has already issued Trump and the Dakota Access pipeline Opponents of the Keystone XL and Dakota Access pipelines hold a rally as they protest US President Donald Trump's executive orders advancing their construction, at Columbus Circle in New York. US President Donald Trump signed executive orders reviving the construction of two controversial oil pipelines, but said the projects would be subject to renegotiation Getty Images The controversial orders Donald Trump has already issued Trump and 'Obamacare' Nancy Pelosi who is the minority leader of the House of Representatives speaks beside House Democrats at an event to protect the Affordable Care Act in Los Angeles, California. US President Donald Trump's effort to make good on his campaign promise to repeal and replace the healthcare law failed when Republicans failed to get enough votes. Mr Trump has promised to revisit the matter Getty Images The controversial orders Donald Trump has already issued Donald Trump and 'sanctuary cities' US President Donald Trump signed an executive order in January threatening to pull funding for so-called "sanctuary cities" if they do not comply with federal immigration law AP The controversial orders Donald Trump has already issued Trump and the travel ban US President Donald Trump has attempted twice to restrict travel into the United States from several predominantly Muslim countries. The first attempt, in February, was met with swift opposition from protesters who flocked to airports around the country. That travel ban was later blocked by the Ninth Circuit Court of Appeals. The second ban was blocked by a federal judge a day before it was scheduled to be implemented in mid-March SANDY HUFFAKER/AFP/Getty Images The controversial orders Donald Trump has already issued Trump and climate change US President Donald Trump sought to dismantle several of his predecessor's actions on climate change in March. His order instructed the Environmental Protection Agency to reevaluate the Clean Power Plan, which would cap power plant emissions Shannon Stapleton/Reuters

Francois Deschamps, an organiser of a refugee-support group in Quebec City, said the motive remains unknown, but right-wing groups are very organised in Quebec City and distribute fliers at the university and plaster stickers around town.

Deschamps said he has personally 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.

Canada is generally very welcoming toward immigrants and all religions, but it's less so in the French-speaking province of Quebec.