Prince William has arrived at the Supreme Court, to be met by a combination of pro-republic demonstrators and Ministry of Justice staff calling for a pay rise.
More than 1000 people turned out to see the prince, who was escorted by police and royal security and accompanied by the Prime Minister John Key.
Shouts of "we love you, William!" rose above the enthusiastic applause as he passed.
A powhiri followed, and the prince was presented with the gift of a korowai (feather cloak) from Te Papa, which he placed on his shoulders.
William then passed along a hongi line of local iwi and notable guests including June Jackson, Sam Jackson, Sir Paul Reeves and Sir Ralph Ngatata Love.
Prince William was performing his first official duty for the Queen by opening the court, an edifice that represents another severed link between New Zealand and "mother England".
The permanent home for New Zealand's highest court replaces the London-based Privy Council.
Among the crowd were Republican Movement protesters and Ministry of Justice staff demonstrating over a long-running pay dispute.
The new court, diagonally opposite Parliament, consists of two connected buildings - the 1881 High Court and the new, modern interpretation of it. Construction took just over two years and, at a cost of $80.7 million.
People stood on nearby rooftops to get a glimpse of Prince William.
One woman in Lambton Quay said the wait was worthwhile.
"You only get one opportunity to see him."
Eight-year-old Jacinda Mendoza from Upper Hutt was waiting with her grandmother with a bunch of flowers for the prince.
Another young girl, Melissa Moroney, saw him have the Maori cloak draped on him.
She said it was a "once in a life time opportunity to see him in the flesh. You can't really pass that up".
Many people said they would wait until after Prince William officially opened the Supreme Court to see him again.
Earlier this morning, after a slight delay to the prince's plane landing in Wellington's fog-bound airport, he inspected a guard of honour and placed a wreath at the National War Memorial.
The prince arrived at the memorial around 10.10am, and stood on a podium while the military band played part of God Save the Queen. The air force, navy and army royal guard saluted him.
Walking with his arms behind his back and wearing a double-breasted suit, he reviewed two lines of troops.
Inside the memorial, where an armed military guard was stationed along the walls, the prince laid a wreath below.
Written on the wreath was: "In deep respect and grateful memory of the men and women of the armed forces who have sacrificed their lives for New Zealand and for freedom."
He stood at attention in silence, a head taller than Mr Key, as prayers were read out.
This afternoon he will visit Kapiti Island wildlife sanctuary to see a little spotted kiwi, and endangered species, later will be at a barbecue hosted by Mr Key at Premier House.
He will leave for Australia tomorrow.
- NZPA, NZ HERALD STAFF