(CNN) - Britain's Prince William has visited a mosque in New Zealand where 42 people were killed in March, saying "the forces of love will always prevail over the forces of hate."
In a speech at the Al Noor mosque in Christchurch Friday, the second day of his tour of the country, he said the attacks in which 50 people died were intended "to sow division and hatred in a place that stands for togetherness and selflessness."
Authorities charged Brenton Tarrant, a 28-year-old Australian man, on 50 counts of murder.
"An act of violence was designed to change New Zealand but instead the grief of a nation revealed just how deep your wells of empathy, compassion, warmth and love truly run," William said.
The Duke of Cambridge was accompanied by New Zealand's Prime Minister, Jacinda Ardern.
Standing in the mosque in the room where the attack took place, he called it "an act of unspeakable hate."
"You showed the way we must respond to hate with love," he added. "You showed that when a particular community is targeted with hate and violence, simple acts like wearing a headscarf or broadcasting the call to prayer can reassure those who have reason to be afraid."
Referring to the far-right gunman accused of the shootings, William said he had come to New Zealand to "help you show the world that he failed."
Earlier, the prince met with survivors of the shootings, such as 5-year-old Alen Alsati, who is being treated at the Starship Children's Hospital in Auckland, and her father, Wasseim.
The-CNN-Wire ™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.