Gareth Bale's deflected free-kick earned Wales a memorable win over Ukraine in Cardiff and qualified the home side for a first World Cup since 1958.
Bale, so often Wales' talisman, again produced the decisive moment with his 34th-minute set-piece, which Andriy Yarmolenk headed into his own net.
However, it was Wales goalkeeper Wayne Hennessey who took the man-of-the-match honours with an outstanding display that kept the gifted Ukrainians at bay.
So, over six decades after reaching their one and only World Cup in Sweden, Wales are back at football's global table.
And, just like at Euro 2016 in France, Wales will find themselves in the same group as England, with Iran and the United States for company.
Success was achieved in the face of the world willing Ukraine on to victory against the odds.
Russia’s invasion of the country in February, and the bloody conflict that has ensued, made Ukraine the choice of neutrals.
But, as Bale said before kick-off, Wales could not show compassion on the field and that proved to be the case when nerves were stretched to the limit.
As Ukraine’s players wilted to the floor on the final whistle, Wales celebrated after banishing the ghosts of history.
So near, so far, in the past. Gut-wrenching failures had slipped into Welsh legend since John Charles and company reached the 1958 quarter-finals before losing to Brazil and a solitary Pele goal.
Joe Jordan’s handball at Anfield in 1977, more penalty heartbreak against Scotland eight years later, Paul Bodin’s decisive spot-kick miss at home to Romania in 1993 and a 2018 defeat to the Republic of Ireland haunted Welsh memories.
This time it felt different. Bale, despite being woefully short of game-time as his Real Madrid career drew to an inauspicious close, had dragged Wales over the semi-final line against Austria with a brilliant brace.
Bale had played just 30 minutes of football since that Austria win on 24 March, but he led out a side showing one change from that game.
The fit-again Kieffer Moore replaced Harry Wilson to pose an aerial threat to Ukraine’s defenders, who had an easy ride against Scotland on Wednesday.
Ukraine had spent huge energy on an emotional night at Hampden, their first competitive match since November. The key question was whether they could summon the same spirit and strength just four days on in front of a partisan Welsh crowd demanding to witness history.
Manager Oleksandr Petrakov said a huge Ukrainian flag sent by soldiers from the battlefield, and signed by President Volodymyr Zelenskyy, had been hung in the visitors’ dressing room.
Petrakov kept faith with the side that had beaten Scotland, and Ukraine’s support included 100 refugees who had been given free tickets by the Football Association of Wales.
Ukraine had the ball in the net after two minutes, but Oleksandr Zinchenko had taken the free-kick too quickly for the taste of Spanish referee Antonio Mateu Lahoz.
Hennessey saved the second attempt from Ruslan Malinovskyi, but the goalkeeper was the busiest man on the pitch as Ukraine almost opened up Wales at will.
The Burnley goalkeeper kept out efforts from Viktor Tsygankov and Roman Yaremchuk, and had to use every bit of his 6ft 6in frame to push another deflected effort to safety.
Zinchenko and Tsygankov forced further stops from Hennessey, and it looked a matter of time before Ukraine would score the goal that their supremacy deserved.
But Wales, whose best attempt saw Neco Williams drag wide from just outside the box, took the lead after Daniel James had been fouled 25 yards out.
Bale lined up the free-kick and the intervening head of Yarmolenko saw the ball flash past Georgiy Bushchan in the visitors’ goal.
Ukraine responded as Zinchenko’s powerful shot was tipped around a post, and Wales were relieved to escape a VAR review when Yarmolenko was caught by Allen.
Bushchan denied James on the stroke of half-time, and Wales should have given themselves breathing space four minutes after the break.
Williams sent James free and he found Moore down the left. Moore played an inviting ball into the path of Aaron Ramsey, who with the goal at his mercy missed the target.
The temperature was rising and Wales boss Robert Page was booked for dissent after James went to ground but no foul was given.
Hennessey had been afforded a quieter start to the second half, but produced a wonderful stop to deny Tsygankov with his legs before Yaremchuk stabbed the rebound wide.
Wales sent on Brennan Johnson and the Nottingham Forest youngster struck the post with his first touch.
But Wales were indebted to Hennessey again when he somehow clawed away Artem Dovbyk’s header.
Bale almost sealed victory before making way in the final 10 minutes, but his dream of adding a World Cup appearance to his glittering CV has finally come true.