QUEBEC - In what Prime Minister Justin Trudeau and Premier Philippe Couillard both called a "terrorist attack," six people were killed and eight others injured in a shooting at a Quebec City mosque on Sunday.

Provincial police spokeswoman Christine Coulombe said 39 other people survived and that two suspects were in custody.

Coulombe said a joint terrorism task force that includes provincial police, the RCMP and Montreal police was deployed.

The victims are believed to be between 35 and about 70 years old, she said.

One of the suspects was arrested not far from the mosque, while the other was arrested near Ile-d'Orleans, just east of Quebec City's downtown core.

"For the moment, nothing leads us to believe there are other suspects linked to the event, but you'll understand we're not taking any chances and we're making the necessary verifications to make sure there aren't any," Coulombe said.

Police would not talk about the type of weapon used in the slayings at the mosque, which had a pig's head left outside the building last June.

Trudeau issued a statement Sunday to denounce the killings.

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

"On behalf of all Canadians, Sophie and I offer our deepest condolences to the family and friends of all those who have died, and we wish a speedy recovery to those who have been injured."

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

Couillard also called the incident a terrorist attack and said the national assembly will lower flags to half-mast.

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

Couillard called a news conference early Monday morning and said there is no doubt in his mind the killings constituted an act of terrorism.

"This is a murderous act perpetrated against a specific community and with considerable means," he said. "You can't play around with semantics here."

The premier made an impassioned plea to Quebec Muslims.

"We are with you, you are at home, you are welcome at home, we are all Quebecers," he said. "We must continue to build a society together that is open, welcoming and peaceful. We will do it because we have the energy to do it and the will to do it."

A live video feed on a Facebook page of the mosque showed images of multiple police vehicles and yellow police tape.

Quebec City Mayor Regis Labeaume attended the same news conference and said his thoughts went out to the victims and their families.

"We have the impression we are dreaming," said Labeaume. "Quebec City, this magnificent city, is in mourning. I have often said in recent weeks that, despite the peace we have here, we are not immune (to attacks). Well, this has just proven that."

The mosque issued a Facebook statement early Monday after confirmation of the six dead.

"All our thoughts are with the children who have to be told their father has died," said the Centre Culturel Islamique de Quebec

"May Allah give them patience and strength."

Neighbourhood resident Carol-Ann Andrews said such an attack was "pretty surprising" for Quebec City.

"My thoughts went immediately to what was happening in the United States with all the laws and all the immigrants that are not allowed to come back," she said.

"Unfortunately there are people in the world whose minds are not totally OK so it could have given them an idea to get rid of other people. It's pathetic."

Asked whether she feels safe, she replied, "We're not safe anywhere any more."

Police blocked the area off, while a coffee shop stayed open beyond normal hours and served free coffee. The mosque is across the street from a big stone church

Vigils are planned in Montreal and Quebec City on Monday.