For live coverage of the terrorist attack at a Quebec City mosque, please go here

Two men were in custody after a mass shooting Sunday night at a mosque in Quebec City that killed six people and wounded several more, and was condemned by Prime Minister Justin Trudeau as "a terrorist attack on Muslims."

The Sûreté du Québec early Monday confirmed the number of casualties in the attack on the Centre Culturel Islamique de Québec. The victims were aged 35 to 70, police said, adding that 39 people who were in the mosque at the time of the shooting were unharmed. Many of the witnesses spent the night at a sports centre near the mosque where they were questioned.

Story continues below advertisement

Of those taken to hospital, five were still in critical condition after being operated on overnight, hospital officials said Monday morning. Twelve others with minor injuries have been treated and released.

Investigators do not believe any suspects beyond the two men in custody remain at large and they would not comment on identity of the attackers, motives or methods. "It's much too early," said Christine Coulombe, an SQ spokesperson.

Worshippers were at Quebec City's mosque for the evening prayers when witnesses say two gunmen dressed in black and wearing ski masks walked into the mosque and started shooting. Frantic worshippers started calling 911 at 7:55 p.m., according to police.

One man, who did not want to give his name, said he was in the mosque after the evening prayer when a man walked in and started shooting "everything that was moving."

"It was someone who mastered weapons because it was calm," the man said. "He killed and he killed. It was really horrible."

He said he lay on his stomach near the front of the mosque as the man emptied his weapon. Then, he said, the gunman just stopped and left.

"I'm shocked," he said. "We thought that here, we were in a safe city, a safe country. But unfortunately that's not the case."

Story continues below advertisement

Ali Hamadi had said goodbye to a good friend and left minutes before the gunfire broke out. He was just home when he started getting phone calls telling him that the mosque had come under attack. One of his good friends was killed.

"He was my friend, my colleague. We worked together in the civil service for the Quebec government. Had I not left early I could have been among the victims," Mr. Hamadi said.

When Mr. Hamadi went to the hospital and identified his friend's body all he could think about was the grief his friend's wife and three young daughters will suffer in the days to come.

"Such a tragic event. How can his children ever come to grasp how their father could have been murdered while praying in a mosque?" Mr. Hamadi said.

One of the alleged gunmen called police and turned himself in several kilometres form the mosque. Neither suspect was harmed in the arrests.

Quebec's Integrated National Security Enforcement Team, consisting of investigators from the RCMP, the Sûreté du Québec and the Montreal police service, took over the investigation around 10 p.m. Sunday, when the shooting was determined to be an act of terror.

Story continues below advertisement

Quebec Premier Philippe Couillard and Quebec City Mayor Régis Labeaume held a joint news conference at 1:30 a.m. Monday where they added no details about the attack but expressed condolences and solidarity.

"I want to say a few words to our Québécois compatriots of the Muslim confession. We're with you. You are home, you are welcome in your home. We're all Québécois," said Mr. Couillard.

Mr. Labeaume, usually known for his self-confidence and boisterous nature, was shattered. "Quebec City is in mourning, this magnificent city," he said, his voice drifting off. "I've often said that despite the peace we live, we are not immune to the fates."

Hours after the shooting, the Centre sportif Sainte Foy acted as a hub where concerned community members gathered. Small groups huddled and exchanged information about their missing friends.

Gazi Hamrouni had spent six hours looking for a friend of 20 years.

"He was the first I called when I heard the news," said Mr. Hamrouni. "His phone didn't pick up, now it's dead and I've been to every hospital in the city, several times."

Story continues below advertisement

He said none were able to provide information about his friend, who wasn't on the injured list.

"He doesn't work Sunday nights so this is the place he would be (the mosque) -- he lives five minutes away from it."

Abder Dhakkar and four other men standing in the parking lot were frustrated at the lack of communication to the families of victims.

"Shouldn't there be someone we can go to know what's going on?" Mr. Dhakkar said.

Others at the centre were there, they said, because they felt they had to be. At around 4:30 a.m., the final group of people gathered at the sports centre began to leave, some of them getting into the back of police cars sobbing.

"Out of solidarity," said Lehachie Hakim, a 54-year-old father who was with his two sons when he heard of the shooting.

Story continues below advertisement

"My youngest is completely traumatized. He was crying. It's shocking; I never thought this would happen."

Mohammed Yangui, the mosque president, said 60 to 100 people are usually at the mosque for evening prayers. He was not present for the shooting but spoke to several witnesses who said the men worked their way through two floors of the mosque, reloading as they went.

"A mass shooting. In Quebec City. I can't believe it," he said. "We've never done anything to provoke anyone, and we've never cultivated hatred for anyone. I'm just beside myself."

They walked in on the ground floor of the mosque where men pray, Mr. Yangui said, and also went to the second floor.

Mr. Trudeau said he was being briefed on the attack and was in contact with Mr. Couillard, who drove during the night to Quebec City from his home in the Lac St. Jean area.

"We condemn this terrorist attack on Muslims in a centre of worship and refuge," Mr. Trudeau said in a statement.

Story continues below advertisement

"Muslim-Canadians are an important part of our national fabric, and these senseless acts have no place in our communities, cities and country. Canadian law enforcement agencies will protect the rights of all Canadians, and will make every effort to apprehend the perpetrators of this act and all acts of intolerance."

Condemnations poured in from around the world as word of the attack spread.

New York Mayor Bill de Blasio announced the NYPD was beefing up security around mosques in the wake of the attack.

"All New Yorkers should be vigilant. If you see something, say something," he wrote on Twitter. "Our prayers tonight are with the people of Quebec City as they deal with a terrible attack on a mosque. We must stand together."

French President Francois Hollande has condemned the "odious attack" on a Quebec mosque and offered support for Canada's leaders.

Hollande, whose country has suffered a string of Islamic extremist attacks, said in a statement that "it was the Québécois spirit of peace and openness that the terrorists wanted to harm" in Sunday's attack.

The mosque, also known as La Grande mosquée in the west end of the city, has been the target of vandalism in the past. Last June during Ramadan, a pig's head was left outside the mosque. The head was wrapped in paper and accompanied by a note that said "Bonne appetit [sic]."

In the middle of the night the mosque posted a message on its Facebook page: "All our thoughts for children to whom we must announce the deaths of their dads. May Allah lend them patience and endurance."

Vigils are planned in Montreal and Quebec City on Monday.

Political reaction

Prime Minister Justin Trudeau:

Tonight, Canadians grieve for those killed in a cowardly attack on a mosque in Quebec City. My thoughts are with victims & their families. — Justin Trudeau (@JustinTrudeau) January 30, 2017

Minister of Public Safety Ralph Goodale:

My thoughts and prayers are w/ the victims, their families & community in Ste-Foy tonight. GoC is closely monitoring the unfolding situation — Ralph Goodale (@RalphGoodale) January 30, 2017

Quebec Premier Philippe Couillard: