Boufeldja Benabdallah, centre, co-founder of the Quebec Islamic Centre, flanked by two members of the muslim community, recite a verse from the Qur’ an, at a catholic mass in communion with the victims of the mosque shooting, Tuesday, January 31, 2017 in Quebec City. (Jacques Boissinot/The Canadian Press)

A little more than two years after their own community came under attack, Muslims in Quebec City said they were in shock over the mass shootings at two New Zealand mosques Friday that claimed at least 49 lives.

Their horror was echoed by members of other Muslim communities across the country as they offered condolences to the grieving families and spoke out against extremism.

“Hate has no place anywhere,” Trudeau said in a statement. “We must all confront Islamophobia and work to create a world in which all people — no matter their faith, where they live, or where they were born — can feel safe and secure.”

We extend our deepest condolences to the families and friends who lost loved ones in the terrorist attack on two mosques in New Zealand. Please read my statement on this senseless tragedy: https://t.co/hSxGVQCTZE

Boufeldja Benabdallah, the head of the Quebec City Islamic Cultural Centre, said a feeling of “indescribable pain” was apparent in his own community. He expressed his condolences to the New Zealand victims and expressed concern for families in Quebec City being forced to relive the Jan. 29, 2017 attack that left six men dead.

“I’m convinced they are feeling a terrible pain. Imagine the children of those families here in Quebec who are hearing it on the radio and will watch their mothers cry and ask, ‘Why are you crying?’ ” Benabdallah said.

“The mothers will remember the 29th, when they ran to get husbands who were killed by Alexandre Bissonnette.”

Benabdallah added that amid the mourning, it is time for people to speak out against extremism and for lawmakers to legislate against it.

“We must get back to work once again to explain, to tell these extremists of all stripes who politicize religion, like extremists who use race as a basis for discrimination, that we must change,” Benabdallah said. “The world cannot continue like this.”

Police in many cities across the country said they were stepping up patrols around places of worship on Friday and communicating with local Muslim communities about their security concerns.

“We will have a heightened police presence in the community, focusing on places of worship — especially mosques. We have done this to ensure the city is as safe and secure as possible,” said Const. Allyson Douglas-Cook, a Toronto police spokeswoman.

Groups across Canada denounced the attack, including the Islamic Supreme Council of Canada based in Calgary.

“This is nothing but terrorism against Muslims. This is nothing but hate against Muslims. This is nothing but Islamophobia,” Imam Syed Soharwardy said in a statement.

Trudeau said Canadians join New Zealanders and Muslim communities around the world in grieving and condemning the attack and work to act against violent extremism.

“Far too often, Muslims suffer unimaginable loss and pain in the places where they should feel safest,” Trudeau said. “Canada remembers too well the sorrow we felt when a senseless attack on the Centre culturel islamique de Quebec in Ste-Foy claimed the lives of many innocent people gathered in prayer.”

Mohamed Labidi, a past president of the Quebec City mosque, told reporters Friday he regretted that humanity had not learned its lesson after the attack on his community.

“The worshippers are very shaken by what happened in New Zealand. They are very affected by this,” Labidi said following morning prayers.

One man was arrested and charged with murder in what appears to have been a carefully planned racist attack in New Zealand.

There are unconfirmed reports that the shooter was influenced by Bissonnette, the former Universite Laval student convicted of killing six worshippers in 2017.

A now-deleted Twitter account that is believed to be linked to the accused shooter shows what appear to be three assault-rifle magazines, one of which has Bissonnette’s name on it.

Bissonnette was sentenced to life in prison without possibility of parole for 40 years, but both the Crown and his own lawyers have recently announced they are appealing the sentence.