The Netherlands finished their international window with a dramatic hard-fought Nations League win over Wales at the Stadion Feijenoord.
The hosts dominated the first quarter of the match and when Noa Lang and Cody Gakpo scored six minutes apart it looked like Wales could be in for a very long evening in Rotterdam.
Rob Page’s side kept their composure, though, and found a route back into the game against the run of play when Brennan Johnson bagged his second in as many games.
With time running out, substitute Connor Roberts went down in the Dutch area after an aerial challenge and referee Horatiu Fesnic pointed to the spot.
Gareth Bale calmly dispatched the 92nd-minute penalty, low into the right corner, to send the travelling Wales fans delirious, only for Memphis Depay to win it for the Dutch straight from the restart.
For all Wales’ efforts it is a third defeat in the Nations League from four games and they find themselves bottom of Group A4 – although their qualification for the 2022 World Cup will mean this international period will ultimately be deemed a successful one.
The Netherlands remain unbeaten in Louis van Gaal’s second stint in charge and sit comfortably at the top of the group.
Wales struggled to find their rhythm in the opening exchanges, regularly conceding possession in dangerous areas.
Matt Smith was the first to do so in the third minute as the ball was pinched off him by Lang but, as former Spurs striker Vincent Janssen latched on to his through ball, Chris Mepham got back to clear the danger.
Wayne Hennessey was called into action soon after, Gakpo’s crossfield ball gave Lang a shooting opportunity but his effort from distance was straight at the keeper.
As the home fans started Mexican waves the Dutch took the lead.
Wes Burns was at fault for losing possession cheaply as Jordan Teze found Janssen. He crossed for Lang, who twisted one way, then the other, before firing low into the corner.
The Dutch soon had their second. Gakpo’s initial effort was well blocked by a combination of Mepham and Joe Rodon, but the rebound fell perfectly to the PSV Eindhoven winger who curled into the far side of the net.
Under Page, Wales have rarely found themselves two goals down, the last time was against Denmark in the last 16 at Euro 2020.
And they showed great resilience to hit back on 26 minutes.
After scoring his first international goal at the weekend against Belgium, Johnson followed it up with another in style.
This time the Dutch were careless in possession as Dan James won the ball back on halfway.
The ball dropped to Harry Wilson who, in turn, found Johnson and, while the Nottingham Forest man had Matthijs de Ligt to beat, he rolled his effort perfectly across Jasper Cillessen into the far corner.
A first half which started at a rapid pace fizzled out, though Janssen did whistle an effort narrowly wide after a poor clearance from Hennessey.
Hennessey was forced into smart saves from Teun Koopmeiners and half-time substitute Denzel Dumfries within three minutes of the restart.
Smith blasted an effort way over at the other end, before Johnson ran at the home defence, dropped a shoulder and forced a good save out of Cillessen.
For the first time, Wales started to control the tempo and possession, and Page sent on Aaron Ramsey to try to spark a comeback with half an hour remaining.
Janssen’s curling effort forced another save from Hennessey before Page played his other trump card, bringing on Bale for the final 20 minutes in place of James.
Ramsey and Bale’s introduction forced Van Gaal’s hand and the Dutch head coach brought on Depay and Steven Bergwijn.
Wales almost levelled with their best move of the game. Bale, Ramsey and Johnson combined brilliant in midfield before Sorba Thomas crossed to Wilson, whose shot deflected kindly into the hands on Cillessen.
The class of Depay was clear and his introduction firmly swung momentum back the way of the Dutch.
Stefan de Vrij should have put them further in front, but his header lacked power and accuracy when unmarked on the penalty spot.
Hennessey made his best save when Gakpo was through one-on-one, racing off his line and smothering the ball away from the winger.
As they did in Cardiff, Wales thought they had earned a late draw when Bale rolled his spot-kick past Cillessen after Roberts was brought down in the box by Tyrell Malacia.
But it was Barcelona’s Depay who had the final say, when he reacted quicker than Chris Gunter and Mepham to reach a deflected header first and fire past Hennessey.
Wales manager Rob Page told BBC Sport Wales: “First and foremost we were up against a very good team, one of the best in the world.
“We’re disappointed we’ve not seen the game out again, second time in two weeks, but having gone through this experience it will hold us in good stead for the World Cup.
“If you gives teams like this and players like him [Memphis Depay] half a chance it is in the back of the net, that’s the learning curve.”