Britain's Prince William has told survivors of the mosque attacks in New Zealand that people must unite to fight extremism in all its forms.

The Duke of Cambridge on Friday visited one of the two Christchurch mosques where 50 people were killed and 50 others wounded in a March 15 attack by a white supremacist.

Prince William spoke to about 100 people including Muslim leaders and Prime Minister Jacinda Ardern at the Al Noor mosque. He said the message after the attacks was clear: That hate would fail to divide people.

William is on a two-day trip to New Zealand. Earlier on Friday, he met with some of those recovering from gunshot wounds at Christchurch Hospital.

On Thursday, he met with police officers and medics who responded to the attacks.