Justin Trudeau is condemning the fatal shootings at two mosques in New Zealand, saying attacking people during prayers is "absolutely appalling."

In a brief statement on Twitter this morning, the prime minister said Canadians join New Zealanders and Muslim communities around the world in grieving.

At least 49 people were killed at mosques full of worshippers attending Friday prayers in Christchurch.

One man was arrested and charged with murder in what appeared to be a carefully planned racist attack.

There are unconfirmed reports that the shooter was influenced by Alexandre Bissonnette, the Laval University student convicted of killing six people at a mosque in Quebec City in January 2017.

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

The Quebec City mosque attacked by Bissonnette posted the following brief message: "We are following with worry the terrorist attack that occurred against two mosques in New Zealand."

Trudeau later released a longer statement denouncing the incident as a terrorist attack.

"Canadians across the country were appalled to wake up to news of the terrorist attack on two mosques in Christchurch, New Zealand, that killed and injured so many people, including children," Trudeau said in the statement. "Too often, Muslims suffer unimaginable loss and pain in the places where they should feel safest. Canada remembers too well the sorrow we felt when a senseless attack on the Centre culturel islamique de Québec in Ste-Foy claimed the lives of many innocent people gathered in prayer.

"To move forward as a world, we need to recognize diveristy as a source of strength, and not a threat."