Canadian police have charged Quebec mosque attack suspect Alexandre Bissonnette with six counts of first-degree murder.

Mr Bissonnette has also been charged with five counts of attempted murder in the shooting at a mosque late Sunday.

The French-Canadian university student is the sole suspect.

A second man who was arrested is now considered a witness. He is of Moroccan descent, although his nationality was not immediately known. He was named by local media as Mohammed Belkhadir.

Police declined to give details of those arrested or possible motives for the shooting at the mosque.

Police said they were confident no other suspects were involved in the attack.

"They consider this a lone wolf situation," the source said.

In addition to the six killed, five people were critically injured and 12 were treated for minor injuries, a spokeswoman for the Quebec City University Hospital said.

Canadian news outlet CBC has reported that a witness saw the shooter enter the mosque before shots were fired.

"It seemed to me that they had a Quebecois accent," the witness, who asked to remain anonymous, said.

"They started to fire, and as they shot they yelled, 'Allahu akbar!' The bullets hit people that were praying.

"People who were praying lost their lives. A bullet passed right over my head."

Canadian Prime Minister Justin Trudeau earlier called the shooting "a terrorist attack on Muslims".

"Tonight, Canadians grieve for those killed in a cowardly attack on a mosque in Quebec City. My thoughts are with victims & their families," he said.

Quebec Premier Phillippe Couillard took to Twitter to label the attack an instance of "barbaric violence".

"All our solidarity is with those who are close to the victims, the injured and their families," he wrote.

The Islamic Centre posted a Facebook live video after the shooting. (Facebook)

A live Facebook video posted by the Centre showed police officers and a large number of emergency vehicles gathered outside the mosque.

"Shooting in the great mosque of Quebec," the caption reads.

"There are some dead," the page's administrators also wrote.

The videos have been viewed tens of thousands of times and have attracted both tributes and discriminatory comments.

"My thoughts and my support are with the Muslim community of Quebec. Be strong," one man wrote.

Incidents of Islamophobia increased in Quebec in recent years amid a political debate over banning the niqab, or Muslim face covering. In 2013, police investigated after a mosque in the Saguenay region of Quebec was splattered with what was believed to be pig blood.

The same mosque had a pig’s head left outside the building last June, CTV reported.

In the neighboring province of Ontario, a mosque was set on fire in 2015, a day after an attack by gunmen and suicide bombers in Paris.

Quebec Premier Phillippe Couillard took to Twitter to label the attack an instance of "barbaric violence".

"All our solidarity is with those who are close to the victims, the injured and their families," he wrote.