Wales exited Euro 2020 at the last-16 stage as Denmark continued their emotional quest for glory with an emphatic 4-0 victory at Amsterdam's Johan Cruyff Arena.
The Danes, rocked by Christian Eriksen's cardiac arrest in Copenhagen a fortnight ago, set up a quarter-final tie against either Netherlands or Czech Republic thanks to Kasper Dolberg's double and late strikes from Joakim Maehle and Martin Braithwaite.
Dolberg, starting in place of the injured Yussuf Poulsen, struck the opener with an outstanding, curling finish from outside the box midway through the first half, then pounced on a Neco Williams error to double Denmark's lead shortly after half-time.
Maehle hit the third in the penultimate minute of normal time when he collected a Mathias Jensen cross, cut inside his man and fired home from eight yards out, before Braithwaite added a fourth which was awarded by VAR having initially been ruled out for offside.
- Subscribe to Sky Sports' Euro 2020 podcast
- Gareth Bale ignores question on Wales future
- How the teams lined up | Euro 2020: Full schedule
Wales, semi-finalists at Euro 2016 and second-placed qualifiers from Group A having taken four points from three games with Switzerland, Turkey and Italy, started brightly but faded badly after the opener and had substitute Harry Wilson sent off for a wild challenge on Maehle in the final few minutes.
The dominant Danes, meanwhile, buoyed by a partisan crowd with Welsh supporters not permitted to travel to the Dutch capital, scored four goals for the second consecutive game following their 4-1 thrashing of Russia in Group B, and became the first side to reach the last eight in the absence of the recovering Eriksen.
Wales: Ward (7), C Roberts (5), Rodon (5), Mepham (5), Davies (5), Morrell (5), Allen (6), Bale (5), Ramsey (5), James (5), Moore (5).
Subs used: Williams (4), Brooks (5), Wilson (4), T Roberts (5)
Denmark: Schmeichel (6), Christensen (8), Kjaer (7), Vestergaard (7), Stryger Larsen (8), Hojbjerg (7), Delaney (8), Maehle (9), Braithwaite (8), Damsgaard (8), Dolberg (9).
Subs used: Cornelius (7), Jensen (7), Norgaard (7), Boilesen (6), Andersen (6).
Man of the match: Kasper Dolberg.
How Denmark broke Welsh hearts
Wales may have been outnumbered in the stands but they looked more like the home side out on the pitch in the early stages as Gareth Bale, Aaron Ramsey and Daniel James took the game to Denmark.
Bale had the first chance, cutting inside from the right and firing a low shot a few yards wide of Kasper Schmeichel's far post from outside the box, with Ramsey then seeing two efforts blocked in quick succession.
James was next to try his luck as Rob Page's side continued to put the Danes under pressure, but his diagonal effort from the right-hand side of the box was comfortably collected by Schmeichel.
Denmark, the first side in European Championship history to reach the knockout stages having lost their first two group games, were struggling to contain the Welsh attack at that point but soon roles were reversed.
- Wales recalled Ben Davies, Chris Mepham and Kieffer Moore after they were benched in the final group game against Italy to avoid possible suspensions.
- Denmark made two changes from their 4-1 win over Russia, with Kasper Dolberg and Jens Stryger replacing Daniel Wass and Yussuf Poulsen.
Theo Delaney and Pierre-Emile Hojbjerg began to control the midfield with help from Andreas Christensen, and the excellent Mikkel Damsgaard began to combine dangerously with Dolberg.
It was that combination which yielded the opening goal as Damsgaard wriggled away from Ramsey and fed Dolberg, who finished brilliantly having been given too much space by Chris Mepham.
Damsgaard and Dolberg almost combined for a second goal just five minutes later, with the former getting to the Welsh byline and cutting the ball back for the latter, whose goalbound flick from close range required a sharp save by Danny Ward.
Wales were rocking, with large gaps appearing in their defence every time Denmark came forward, and their problems were compounded when right-back Connor Roberts pulled up with an apparent groin injury.
Williams came on in his place but the Liverpool defender was left outnumbered at the far post in first-half stoppage time as a Jens Stryger Larsen cross found its way to the unmarked Maehle, whose side-footed shot had to be scrambled away by Ward.
Wales were fortunate to reach the break only trailing by a single goal but Denmark doubled their lead immediately after the restart when Williams' misdirected clearance fell straight to Dolberg.
The Welsh players were furious that Denmark captain Simon Kjaer was not penalised for a clumsy challenge on Kieffer Moore in the build-up, but a VAR check upheld the goal and Denmark continued to dominate proceedings from then on.
Wales, visibly tired after their group-stage exertions, failed to muster a single shot on target in the second half, with Ramsey and Bale successfully nullified, but Denmark had to wait until late on to extend their advantage.
Substitute Jensen and Braithwaite both struck the woodwork , while Joachim Andersen, another substitute, fired another effort narrowly wide before the floodgates opened in the final few minutes.
Maehle, a menace to Wales throughout, took his goal clinically, while Braithwaite finished with aplomb too and was finally permitted to celebrate after a lengthy VAR check ruled in Denmark's favour.
Denmark's players enjoyed the victory in front of their supporters after the final whistle, while Page's men looked disconsolate, their Euro 2020 journey over despite some memorable highs during the group stage.
'Angry' Bale: It was a foul
Gareth Bale rued a disappointing Wales performance but insisted Denmark's second goal should have been ruled out for Kjaer's apparent foul during the build-up.
"Yes, definitely," he told the BBC. "If you go and play the ball through the back of someone, it's a foul.
"I felt like the ref was maybe being influenced by a lot of [Danish] supporters here but it is what it is. There's no point making excuses now. It's disappointing.
"We've missed an opportunity but what we can't fault is the effort the boys showed and that's the minimum requirement for this group and I'm proud of them still."
He added: "Of course it's a disappointing end to the tournament, it's not how we wanted the game to go. From our point of view, we started very well the first 25 minutes, conceded a goal and the game changed a little bit.
"We came out in the second half trying to play and unfortunately conceded a goal which I guess killed the momentum on our side. To finish the game how we did is disappointing but the boys are frustrated and angry.
"I'd rather us go out like that, kicking and screaming than laying off and doing nothing."
When asked if he had just played his final game for Wales, Bale walked away from the interview without answering.
Opta stats - Wales' red mist
- Denmark have won each of their last four competitive meetings with Wales in a run stretching back to June 1999, with today's clash the first meeting between the sides in a major tournament.
- Wales have lost consecutive major tournament matches for the first time in their history (World Cup/Euros).
- Wales are the first team to receive two red cards in a single edition of the European Championship since Russia and Switzerland in 2004.
- Denmark have scored more goals from outside the box than any other side at EURO 2020 (three), while since 1980 only France (five in 1984) and Belgium (four in 2016) have scored more from distance in a single edition of the competition
- Denmark have registered consecutive wins within a single major tournament (World Cup/Euros) for the first time since the 1986 World Cup.
Denmark will face either Netherlands or Czech Republic in the Euro 2020 quarter-finals in Baku on Saturday July 3.