This article is more than
7 year oldShots were fired at the Quebec Islamic Cultural Centre on Sunday night, where more than 50 people had gathered for evening prayers.
One suspect was arrested at the scene and another was arrested nearby. Police do not believe there are other suspects at large.
The Canadian authorities are treating the shooting as a terror attack.
"We condemn this terrorist attack on Muslims in a centre of worship and refuge," Prime Minister Justin Trudeau said in a statement.
"Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, cities and country."
Quebec Premier Philippe Couillard also referred to the shooting as a terrorist attack.
The dead were aged between about 35 and 70 years old, police spokeswoman Christine Coulombe said. Some of those injured were in a serious condition, she said.
Police said the area was secure and the situation was "under control". Thirty-nine people had left the mosque safely, they said.
Earlier, a witness had told Reuters news agency that up to three gunmen had been involved. The news agency also reported that a "heavily armed police tactical squad" had been seen entering the mosque.
The second suspect fled the scene in a vehicle but was arrested on a bridge leading to Orleans Island, the Journal de Quebec reported. The suspect had called the police himself, the newspaper said.
Police seized automatic weapons and handguns from the alleged attackers, the Journal de Quebec said.
The president of the mosque, Mohamed Yangui - who was not inside at the time - said the shooting had happened in the men's section of the mosque.
"Why is this happening here? This is barbaric," he said.
On its Facebook page the centre thanked the public "for the hundreds of messages of compassion".
In June last year the same mosque was the target of an Islamophobic incident when a pig's head was left in front of the building, with a card saying "bonne appetit".
Eating pork is forbidden in Islam.