New Zealand has failed to make the semi-finals of the under-20 Rugby World Championship in England.
It is the first time New Zealand hasn't reached the last four in the nine-year history of the annual under-20 World Championship.
The New Zealanders finished second in their group behind Ireland, after beating Wales 18-17 in their final pool game in Salford.
Wales jumped out to an early 14-3 lead before the New Zealanders bounced back with tries to halfback Sam Nock and fullback Shaun Stevenson.
The defending champions still needed a penalty from Jordie Barrett in the last minute to claim the win.
The winners of the three pools qualified for the semi-finals, along with the best second-placed team, which was South Africa.
Ireland will play Argentina, and England will play South Africa, in the semi-finals.
New Zealand will now play Wales again in the first of their classification matches for 5th to 8th.