The eye-balling, lip-curling and guttural chanting of the Haka was originally intended to prepare warriors for battle.
Nowadays, it is usually performed to welcome distinguished guests, or to intimidate rival rugby teams.
On the manicured lawn outside Government House in Wellington, President Michael D Higgins watched a Maori group perform the traditional dance.
The President is now on his state visit to New Zealand, having completed a two-week tour of Australia.
Schoolboy Aiden McElrea (9), who was also attending the ceremony, said: "It's very shouty and very scary and very, very cool."
The Haka had been preceded by the Hongi, an ancient greeting which saw President Higgins and his wife Sabina gently press their foreheads and noses against Maori elders, Professor Piri Sciascia and Dr Kiria Hape. This represents the exchange of breath, and symbolises the acceptance of visitors to local land. The came the Wero - or challenge.
The President and Governor-General, Dame Patsy Reddy, discussed the aftermath of Storm Ophelia and the ties between Ireland and New Zealand.
Some 20pc of New Zealand's population can claim Irish ancestry.
"We are family," Ms Reddy said later, at a state dinner attended by the prime minister elect, Jacinda Ardern.
President Higgins later praised New Zealand's national stance on disarmament, and for signing the Treaty on the Prohibition of Nuclear Weapons in New York last month.