Prince William tells New Zealanders, 'you stood up' to attacks
"You stood up and you stood together," the Duke of Cambridge has told New Zealanders in the aftermath of March's shootings which killed 50 people.
Prince William called the attacks an "unspeakable act of hate" in a speech at the Masjid Al Noor mosque in Christchurch, where 42 people died.
Praising the country's response, he said "in a moment of acute pain" they had "achieved something remarkable".
Earlier, the duke met survivors on a visit to a hospital in Christchurch.
He was joined at the mosque, during the second day of his visit, by Imam Gamal Fouda and New Zealand's Prime Minister, Jacinda Ardern.
Referring to the far-right gunman behind the shootings, Prince William said he had come to New Zealand to "help you show the world that he failed".
He said a "terrorist attempted to sow division and hatred in a place that stands for togetherness and selflessness".
He added: "But New Zealanders had other plans. The people of Al Noor and Linwood mosques had other plans. In a moment of acute pain, you stood up and you stood together."
- William meets Christchurch attack survivors
- Attack victims honoured in Christchurch
- UK survivor 'cradled woman' in NZ shooting
- The people killed as they prayed
Prince William also referred to the loss of his own mother, Princess Diana, and spoke of having to deal with grief.
He said: "Grief can change your outlook. You don't forget the shock and sadness or pain, but I do not believe grief changes who you are.
"If you let it, it will reveal who you are. It will reveal depths you did not know you had."
The prince had earlier met four-year-old Alen Alsati - who was injured in the attack and awoke from a coma earlier this week - on a visit to Starship Children's Hospital.
He also visited a memorial to the victims of the earthquake which hit Christchurch in 2011, where he laid a wreath.
En route, the prince stopped to talk to five-year-old Tilly Pearce, who stood among the crowds holding a sign which read: "Prince William I love your grandmother."
Tilly, who has been saving her pocket money for a trip to London to have tea with the Queen, described the moment as "really exciting".
On the first day of his tour he received a traditional greeting called the hongi from Ms Ardern and attended an Anzac Day memorial service.