UN Secretary-General Antonio Guterres called for widespread efforts to "extinguish" hate speech that spreads like "wildfire" on social media as he visited Christchurch's Al Noor Mosque.
Guterres said he had ordered a United Nations team be set up to improve the organisation's way of dealing with hate speech and develop a "global plan of action".
He said: "Hate speech is spreading and public discourse is being coarsened.
"Social media is being exploited as a platform for bigotry. We must all show solidarity in response to this dangerous upsurge in hatred.
"I have asked my special adviser for the prevention of genocide, Adama Dieng, to bring together a United Nations team to scale up our response to hate speech and present a global plan of action.
"Hate speech is spreading like wildfire in social media. We must extinguish it. There is no room for hate speech – online or offline."
His promise to do more to tackle the online threat comes as Prime Minister Jacinda Ardern prepares to address world leaders and tech giants in Paris for the Christchurch Call summit, which will try to find a global path for tackling hate speech.
Guterres, who is visiting New Zealand before flying to Fiji to attend the Pacific Islands forum this week, laid a large bunch of flowers outside the mosque before being introduced to some of those injured in the attacks by Imam Gamal Fouda and Muslim Association of Canterbury president Shagaf Khan.
Speaking outside after discussing the atrocity and its aftermath with leaders from the Muslim community, Guterres said he had also set in motion an initiative to protect and safeguard holy sites.
The secretary-general, who was joined by Climate Change Secretary James Shaw ahead of environmental talks in Christchurch later on Tuesday with Ngai Tahu, said he makes a "visit of solidarity" each year during Ramadan, last year to Mali, in 2017 to Afghanistan.
"This year, because of the terrible terrorist attack against your community, I wanted to be here with you," he said.
"Ramadan is a season of reflection, remembrance and renewal. I am here to express my deepest condolences, my profound respect, and the fullest measure of my solidarity to you, your families and the community.
"I know there are no words to relieve the hurt and sorrow and pain. But I wanted to come here personally to transmit love, support and total and complete admiration.
"I want to thank you for doing what you're doing to help us better know each other – and see our shared humanity.
"In these trying times, I am here to say with a full heart: You are not alone. The world is with you. The United Nations is with you. I am with you."