The New Zealand under-20 side will play England in the semifinal of the world junior championships in France after it beat Ireland in a close match yesterday (NZ time).
The match against Ireland was a winner-takes-all battle after both sides had won their previous two games, against Australia and Fiji.
New Zealand made the most of its chances and Otago midfield back Michael Collins was again one of the best, looking solid in both attack and defence.
Highlanders centre Jason Emery looked lively on attack and showed some twinkling feet but he had a few misses on defence.
Harbour flanker Hadleigh May came on in the second half and made some solid hits on defence, while Southern midfielder Tei Walden did not get off the reserves bench.
University A outside back Faasiu Fuatai was listed to play but did not take the field, replaced by Penikolo Latu, of Hawkes Bay.
The first half was relatively even. New Zealand first five-eighth Simon Hickey missed a few shots at goal, before lock Patrick Tuipulotu scored a try.
Irish centre Tom Farrell was yellow-carded right at the end of the first half for making a tackle from an offside position. His absence was pounced on by New Zealand and hooker Epalahame Faiva and winger Lolagi Visinia scored while the Irish were down to 14 men.
Faiva then scored his second try and New Zealand was up by 20 points with not even the halfway mark in the second half reached.
But Ireland came back and the New Zealanders had a rough finish. They went down to 14 men, when replacement prop Nick Grogan was binned for incorrect entry into an Irish rolling maul, but the defence held.
With the win, and South Africa just squeezing past France, the men in black earned the top seeding.
New Zealand will play England on Wednesday, kicking off at 6.45am (NZ time), while defending champion South Africa plays Wales.
World junior champs
The scores
New Zealand U20 ... 31
Epalahame Faiva 2, Patrick Tuipulotu, Lolagi Visinia tries; Simon Hickey 3 pen, con
Ireland U20 ... 26
Tom Farrell, Dan Leavy, Edward Byrne tries; Rory Scannell 3 pen, conHalftime: New Zealand 14-11.