Two men with masked faces entered the compound of the cultural center around 7:15 pm on Sunday (Monday 12:15 GMT), witnesses said on television.
A large police force quickly set up in the vicinity, and the first wounded were treated in ambulances on the spot.
"I am told that there are at least five deaths," said Mohammed Yangi, president of the Islamic Cultural Center in the capital of Quebec.
A spokesman for the Quebec City police confirmed on the television stations that there were deaths, but without specifying the number of victims
A large police operation was launched after the shooting and two suspects were arrested, including a few kilometers from Quebec City after fleeing.
"Canadians mourn the victims of the loose attack in a mosque in Quebec City. My thoughts are with the victims and their families," Canadian Prime Minister Justin Trudeau said on Twitter. He had promised to welcome the refugees "irrespective of their faith" in the aftermath of the White House's controversial decision to ban the entry of the United States to nationals of seven Muslim countries.
- "Barbaric Violence" -The head of the government of the French-speaking province Philippe Couillard also condemned this attack against Muslims. "Quebec categorically rejects this barbaric violence. Let us unite against violence and solidarity with Quebeckers of Muslim faith," he wrote on Twitter.
"I condemn this senseless gesture," declared the Mayor of Quebec Régis Labeaume.
Difficult in the confusion to determine how many people were gathered for the last Sunday prayer. Generally, according to Mohammed Yangi, 60 to 100 people attend these prayers at the mosque.
The witnesses admitted their misunderstanding after the shooting. "I do not understand why here is a small mosque and Quebec, it is neither Montreal nor Toronto" (southeast), said a man who was inside the center at the time of the " Attack, without wanting to give his identity.
"We were preparing (for an attack of this type) because it is happening all over the world," a police officer in charge of the security perimeter told AFP.
The Islamic Cultural Center of Quebec, which is also known as the Grand Mosque of Quebec City, had already been the target of a gesture of a hateful nature, but much less serious: a pig's head had been placed in front of one of Its doors last summer.
Other mosques in Canada have also been the target of racist graffiti in recent months.