Shots were fired at the Quebec Islamic Cultural Centre on Sunday night, police said.
The centre’s Facebook page posted video of police outside the scene, with a written comment that there were “some dead”.
Police said two people had been arrested, but did not provide a number for those killed or injured.
Dozens of people are believed to have been inside at the time, taking part in evening prayers.
Unconfirmed reports suggested as many as five people may have been killed.
A witness told Reuters news agency that up to three gunmen had been involved. The news agency also reported that a “heavily armed tactical squad” had been seen entering the mosque.
But police later said the area was secure and the situation was “under control”. The investigation, they said, was ongoing.
Local newspaper Le Soleil said it had obtained information that one of the suspects was a 27-year-old with “a Quebec name”, and one had an AK-47 automatic weapon in his possession. Police, however, have not released such details.
The shooting happened at the mosque on chemin Sainte-Foy, one of two operated by the Islamic centre.AFP Police arrived on the scene and made two arrests
Video posted to social media showed a large number of emergency vehicles outside the mosque, with the area cordoned off by police.
The president of the mosque, Mohamed Yangui – who was not inside when the shooting happened – told Reuters he did not know how many people were injured, but they had been taken to hospitals across Quebec.
“Why is this happening here? This is barbaric,” he said.
The same mosque had a “gift-wrapped” pig’s head left on its doorstep in June last year, with a note reading “bonne appetit”. Muslims do not eat pork.QUEBEC ISLAMIC CULTURAL CENTRE The centre called the mock gift “a gesture of hate”
Philippe Couillard, the premier of Quebec, said he categorically rejected “this barbaric violence” and expressed solidarity with Muslims in Quebec.
Prime Minister Justin Trudeau tweeted in both English and French, saying: “Tonight, Canadians grieve for those killed in a cowardly attack on a mosque in Quebec City. My thoughts are with victims and their families.”