Reigning champions New Zealand gained revenge over Wales to book their place in the Junior World Championship final.
Wales had inflicted the Baby Blacks' first defeat in the competition's history in the pool stages.
Danny Wilson's side had lead 6-0 early on in the game in Cape Town thanks to two Tom Prydie penalties.
But tries by Jimmy Tupou, Jason Emery, Jordan Taufua and Ofa Tu'ungafasi secured New Zealand's place in the final.
Wales claimed the game's first points with wing Prydie's successful penalty from 22 meters out and they maintained their lead despite New Zealand pressure.
They stretched their lead on 14 minutes when Newport Gwent Dragons' new recruit Prydie added a second penalty to make it 6-0.
The Welsh defence was holding firm but New Zealand reduced the deficit on 26 minutes with a well taken drop goal by Ihaia West.
And within three minutes fly-half West has levelled the score with a successful penalty for the Baby Blacks, who ended the half strongly.
Their pressure paid off when following a scrum close to Welsh try line, Tupou crossed for the game's opening try.
West successfully converted Tupou's try and give New Zealand a 13-6 half-time lead.
They extended their lead after the restart when a fine move resulted in centre Emery crossing in the corner for his side's second try.
West again successfully converted the try and New Zealand were ahead 20-6 as Wales found it hard to get back into the game.
Taufua scored New Zealand's third try of the game with 15 minutes remaining although West failed with the conversion.
The holders sealed victory with Tu'ungafasi scoring a fourth unconverted try late on to secure a final against hosts South Africa at Newlands on Friday while Wales will face Argentina in the play-off for third place.
Wales head coach Danny Wilson: "We lost to the better side on the night. Our confidence was never in question. We had belief that we could beat them.
"New Zealand played, second half especially, very well. They controlled the breakdown which was an area we felt we controlled in the first game.
"We weren't as accurate as we have been throughout the rest of the tournament, made to many errors in certain aspects of play which you can't afford to do against a good New Zealand team."
Wales: Ross Jones (Ospreys); Tom Prydie (Dragons), Cory Allen (Blues), Jack Dixon (Dragons) Eli Walker (Ospreys); Matthew Morgan (Ospreys), Tom Habberfield (Ospreys); Rob Evans (Scarlets), Kirby Myhill (c, Scarlets), Samson Lee (Scarlets), Rhodri Hughes (Ospreys), Matthew Screech (Blues), Luke Hamilton (Blues), Ellis Jenkins (Blues), Dan Baker (Ospreys)
Replacements: Darran Harris (Blues), Gareth Thomas (Carmarthen Quins), WillGriff John (Blues), Ieuan Jones (Drgaons), Daniel Thomas (Scarlets), Jonathan Evans (Dragons), Sam Davies (Ospreys), Thomas Pascoe (Blues)