The New Zealand Under 20s will be playing for the minor placings at the World Championship in England, and they have only themselves to blame.
For the first time since the tournament started in 2008, the five-time champion New Zealanders missed the semifinals.
They could thank a 79th minute Jordie Barrett penalty goal for snatching an 18-17 win over Wales in their final pool game, meaning they finished second behind Ireland in Pool A. But then they sat in the stands, nervously taking updates on the Pool C decider between South Africa and France, in which the Baby Boks scored a 40-31 bonus point win to snatch the best second placed qualifying berth.
New Zealand, in truth, did not deserve to reach the top four, decisively outplayed by Ireland four days ago and then far too inaccurate against Wales.
In greasy conditions, again unsuited to their expansive style of play, New Zealand made heavy weather of their game plan against a limited but far more accurate Wales, the Under 20 Six Nations champions. Scott Robertson's charges did score two tries to one, and tried to be more direct than in the defeat to Ireland, but could get little of their game going and made a stack of unforced errors, such as putting kickoffs out on the full, while struggling to combat the Welsh line speed.
Wales made the early running, racing to an 11-0 lead after centre Joe Thomas latched onto a deft drubber by No 10 and player of the day Daniel Jones.
After lock Seb Davies was sinbinned, New Zealand scored on the stroke of halftime via halfback Sam Nock from a clinical 8-9 scrum move. But Wales were still 14-10 to the good at the half.
Coach Scott Robertson talks to RadioSport's Reuben Mama
Barrett was binned for a late shoulder charge early in the second spell, but New Zealand pulled to within two when fullback Shaun Stevenson, who was dangerous on the counter all night, speared over from short range.
South African referee Czwendile Jadezweni showed a yellow card to wing Tom Williams for a deliberate knock into touch as the clock wound down. Up stepped Barrett to spare Kiwi blushes, and a first defeat to Wales Under 20s since the 2012 9-6 reverse in Stellenbosch.
The upshot is that New Zealand will face Wales again on Tuesday morning (2.15am NZT) in the fifth place semifinal, while Scotland and Australia clash in the other fifth place playoff.
The major semis see Ireland play Argentina and England and South Africa reprise the 2014 Junior World Championship, won by England at Eden Park.
New Zealand 18 (Sam Nock, Shaun Stevenson tries; Jordie Barrett con, 2 pen) Wales 17 (Joe Thomas try; Daniel Jones 4 pen) HT: 14-10 Wales