He wrote that "49 innocent people have so senselessly died, with so many more seriously injured. The US stands by New Zealand for anything we can do. God bless all!"
This is one of New Zealand's darkest days: Ardern
Turkish President Recep Tayyip Erdogan called the attacks the "latest example of rising racism and Islamophobia."
New Zealand police said at least 49 people were killed Friday at two mosques in the picturesque South Island city of Christchurch. More than 20 were seriously wounded in what Prime Minister Jacinda 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.
Speaking at the funeral of a former minister, Erdogan said the Islamophobia that motivated the attacks "has rapidly started to take over Western communities like a cancer."
Pakistan's Prime Minister Imran Khan echoed those sentiments.
Witness Mirwais Waziri describes Christchuch attack
"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 tweeted.
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 (hash)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."
Mayor Bill de Blasio said New York City is providing extra security for Muslim community centers and mosques. He said he wants the city's Muslims to know that New Yorkers "truly embrace" them and "have their backs."
Prime Minister Justin Trudeau said Canadians are appalled by the attack and said they remember all too well the sorrow after a Canadian man shot dead six Muslim men in a Quebec mosque in 2017.
"Far too often, Muslims suffer unimaginable loss and pain in the places where they should feel safest," Trudeau said in a statement. "To move forward as a world, we need to recognize diversity as a source of strength, and not a threat."
Indonesia's President Joko Widodo condemned the attacks, in which an Indonesian father and son were among those wounded. Indonesian Muslim leaders expressed anger at the shooting rampage while urging Muslims to show restraint.
Iran's Foreign Minister Mohammad Javad Zarif said bigotry in Western countries contributed to the attacks on Muslims in New Zealand. In a Friday tweet, he also criticized the West for "defending demonization of Muslims as 'freedom of expression."'
Afghanistan's Taliban movement - Islamic militants who carry out near-daily attacks on Afghan security forces - also condemned the shooting rampage, calling it an "unforgivable crime."
Taliban spokesman Qari Mohammad Yusuf called on the New Zealand government to investigate "the root cause of such terrorism and hand a hefty punishment to the attackers."
Lebanon's Hezbollah militant group, which is considered a terrorist organization by Western countries, condemned the "policy of hatred that the United States is feeding around the world instead of prevailing religious values that call for forgiveness."
Israeli Prime Minister Benjamin Netanyahu called the attacks a "brazen act of terror." His office said on Twitter that Israel mourns the murder of innocent worshippers, condemns the assault and sends its condolences to bereaved families.
Jordan's King Abdullah II tweeted that "the heinous massacre against Muslims praying in peace in New Zealand is an appalling terrorist crime. It unites us against extremism, hatred and terrorism, which knows no religion." Jordan's Foreign Ministry confirmed that one Jordanian was killed and five wounded in the attack.
A telegram of condolences sent by the Vatican on behalf of Pope Francis said he was "deeply saddened to learn of the injury and loss of life" caused by the "senseless acts of violence" in Christchurch. He assured all New Zealanders, and in particular the Muslim community, of his "heartfelt solidarity."
The Palestinian chief peace negotiator, Saeb Erekat, called the attack a "consequence of racist ideologies that continue trying to promote religious wars".
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."
Al-Azhar University, Egypt's 1,000-year-old seat of Sunni Islamic learning, called the attack "a dangerous indicator of the dire consequences of escalating hate speech, xenophobia and the spread of Islamophobia".