Police arrested the two assailants following the shooting Sunday in the Islamic Cultural Center in a busy district of Quebec City.
Police arrested the two assailants following the shooting Sunday in the Islamic Cultural Center in a busy district of Quebec City, police spokeswoman Christine Coulombe said.
She gave no indication of the identities or nationalities of the two suspects.
One witness told Radio Canada that "the two men were wearing black cagoules," and one of them "had a "strong Quebecois accent."
Coulombe said around 50 people were in the mosque when the shooting began at around 7:30 pm on Sunday (0030 GMT Monday) toward the end of evening prayers.
A few minutes later police descended on the Saint-Foy district -- an area packed with offices and shops some 10 kilometers (six miles) west of the city's historic center.
The mosque has already been the target of hate: a pig's head was left on the doorstep last June during the Muslim holy month of Ramadan.
Other mosques in Canada have been targeted with racist graffiti in recent months.
The attack comes as Canada has vowed to open its arms wide to Muslims and refugees after US President Donald Trump's controversial immigration ban Friday sparked travel chaos and outrage around the world.
Trudeau said in a statement that "we condemn this terrorist attack on Muslims in a center of worship and refuge."
"Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, city and country.
"It is heart-wrenching to see such senseless violence," Trudeau said. "Diversity is our strength, and religious tolerance is a value that we, as Canadians, hold dear."
Quebec Premier Philippe Couillard said in a series of Twitter posts that the government was "mobilized to ensure the security of the people of Quebec."
"Quebec categorically rejects this barbaric violence," he wrote. "Solidarity with Quebec people of Muslim faith."
After condemning what he called an "odious attack" French President Francois Hollande said "it's the spirit of peace and openness of the people of Quebec that the terrorists wanted to hit."
Police stationed near the mosque told AFP that they had feared this type of attack "because it's happening all over the world."
"For us Muslims, Quebec and Canada had been a safe zone," said Hamid Nadji, who learned of the shooting from a friend and rushed to the mosque area.
Policy of compassion
The immigration ministry said Sunday that Canada would offer temporary residence permits to people stranded in the country as a result of Trump's order.
"Let me assure those who may be stranded in Canada that I will use my authority as minister to provide them with temporary residency if needed as we have done in the past," Immigration Minister Ahmed Hussen told a news conference.
Trump has suspended the arrival of all refugees to the US for at least 120 days and barred entry for 90 days to people from seven Muslim-majority countries: Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.
Two arrests have been made after five people were shot dead in an attack on a mosque in Québec City, Canada
Hussen, who is of Somali origin, did not condemn the US measure but stressed that Canada would continue to pursue an immigration policy based on "compassion" while at the same time protecting the security of its citizens.
"We welcome those fleeing persecution, terror and war," he said, echoing a welcoming Twitter post by Trudeau on Saturday.
According to the latest Canadian census, from 2011, one out of five people in the country are foreign-born.
Canada has welcomed more than 39,670 Syrian refugees between November 2015 and early January 2017, according to government figures.