Leaders around the world have expressed disgust and sorrow at the killing of 49 people in New Zealand mosques, while some also expressed anger at what they described as the demonization of Muslims that fueled such attacks.

Western leaders including President Trump, U.K. Prime Minister Theresa May and German Chancellor Angela Merkel all expressed solidarity with the New Zealand people on Friday, deploring what the White House called a "vicious act of hate".

The response from some Muslim countries went further, with leaders blaming politicians and the media for stoking hatred. "I blame these increasing terror attacks on the current Islamophobia post-9/11 (where) 1.3 billion Muslims have collectively been blamed for any act of terror," Pakistani Prime Minister Imran Khan wrote on social media.

Turkish Foreign Minister Mevlut Cavusoglu said the attack was a result of Muslims being demonized.

"Not only the perpetrators, but also politicians & media that fuel the already escalated Islamophobia and hate in the West are equally responsible for this heinous attack," he tweeted.

Hundreds of angry protesters in the Bangladeshi capital, Dhaka, chanted "Allahu akbar!" (God is Greatest) after Friday prayers.

New Zealand police said 49 people died and more than 40 were wounded. Three people were in custody, including one man who has been charged with murder, police said.

Prime Minister Jacinda Ardern said some of the victims may have been new immigrants or refugees.

Turkey, Jordan and Indonesia have all claimed that several of their nationals were either killed or injured in the attacks.

The 15-member U.N. Security Council condemned the shootings as "heinous and cowardly," adding acts of terrorism are criminal and unjustifiable. The council stood to observe a moment's silence for the victims on Friday.

Britain's Queen Elizabeth, who is New Zealand's head of state, said she was "deeply saddened by the appalling events" while the Prince of Wales, the Duke and Duchess of Cambridge and the Duke and Duchess of Sussex all offered statements of sympathy and support.

U.K. Prime Minister May said: "I have been in contact this morning with Prime Minister Jacinda Ardern to express the U.K.'s deepest condolences at the horrifying terrorist attack that took place at two mosques in Christchurch .... The U.K. stands ready to support New Zealand however we can.

German Chancellor Merkel mourned "with the New Zealanders for their fellow citizens who were attacked and murdered out of racist hatred while peacefully praying in their mosques".

Pope Francis deplored the "senseless acts of violence" and said he "assures all New Zealanders, and in particular the Muslim community, of his heartfelt solidarity in the wake of these attacks".

Trump described the attack as a "horrible massacre" and said the U.S. stood by New Zealand.

The Palestinian chief peace negotiator, Saeb Erekat, called the attack a "consequence of racist ideologies that continue trying to promote religious wars".

Indonesian President Joko Widodo and the country's two largest Islamic organizations also condemned the shootings.

Norwegian Prime Minister Erna Solberg said the attack brought back memories of 2011, when anti-Muslim extremist Anders Breivik killed 77 people at a youth gathering on a Norwegian island: "It shows that extremism is nurtured and that it lives in many places."