World leaders expressed condolences and condemnation Friday following the deadly attacks on mosques in the New Zealand city of Christchurch, while Muslim leaders said the mass shooting was evidence of a rising tide of violent anti-Islam sentiment.

U.S. President Donald Trump published a tweet early Friday morning sending his "best wishes" to the people of New Zealand after 49 people were killed at two mosques. More than 48 were hospitalized in what Prime Minister Jacind Ardern called a "terrorist attack." 

One man was arrested and charged with murder in what appeared to be a carefully planned racist attack. Police also defused explosive devices in a car. Two other people were being held in custody and police were trying to determine how they might be involved.

Turkish President Recep Tayyip Erdogan called the attacks the "latest example of rising racism and Islamophobia."

Speaking at the funeral of a former minister, Erdogan said the anti-Islam hatred that motivated the attacks "has rapidly started to take over Western communities like a cancer."

Pakistan's Prime Minister Imran Khan echoed Erdogan.

"I blame these increasing terror attacks on the current Islamophobia post-9/11 where Islam & 1.3 bn Muslims have collectively been blamed for any act of terror by a Muslim," he wrote in a tweet.

RELATED: Mass shootings at New Zealand mosques kill 49; 1 man charged

The secretary-general of the 57-nation Organization of Islamic Cooperation, Youssef al-Othaimeen, said in a statement that the attack "served as a further warning on the obvious dangers of hate, intolerance, and Islamophobia."

Queen Elizabeth II, who is New Zealand's head of state, said in a message to the country she was "deeply saddened by the appalling events in Christchurch" and sent condolences to families and friends of victims. The queen also paid tribute to emergency services and volunteers supporting the injured.

"At this tragic time, my thoughts and prayers are with all New Zealanders," she said in her message.

European Commission President Jean-Claude Juncker tweeted that he learned of the attack "with horror and profound sadness."

"The European Union will always stand with #NewZealand and against those who heinously want to destroy our societies and our way of life," he wrote.

In France, home to western Europe's largest Muslim community, Interior Minister Christophe Castaner ordered regional authorities to bolster security at mosques as a precaution.

London's mayor, Sadiq Khan, said the city's Metropolitan Police force would be visible outside mosques.

"London stands with the people of Christchurch in the face of this horrific terror attack," he said. "London will always celebrate the diversity that some seek to destroy."

London mosques have been targeted in the past. One man died and several others were injured in 2017 when Darren Osborne drove a van into people leaving evening prayers. Prosecutors say Osborne was motivated by a hatred of Muslims and far-right propaganda he found online.

In Iran, foreign ministry spokesman Bahram Ghasemi condemned the attack and urged New Zealand authorities to bring to justice those who carried out the "racist, inhumane and barbaric" attacks.

Anwar Gargash, the United Arab Emirates' minister of state for foreign affairs, tweeted, "heartfelt condolences" to New Zealand.

"Our collective work against violence & hate must continue with renewed vigor. Our thoughts & prayers are with the families of the victims," Gargash wrote.

German Foreign Minister Heiko Maas extended his country's sympathies to the friends and families of the victims of the attack.

"The horrific terrorist attack in Christchurch targeted peacefully praying Muslims — if people are murdered solely because of their religion, that is an attack on all of us," he said.