Ukraine had good chances to score but could not quite find the breakthrough
Having beaten Scotland in an emotionally draining semi-final four days earlier, the Ukrainians - with the backdrop of their country's war with Russia - were deeply impressive once again but fell just short in their attempt to reach only a second World Cup in their history.
Instead, it was Wales who achieved that feat at a delirious Cardiff City Stadium.
Their winning goal came against the run of play as Gareth Bale's first-half free-kick was inadvertently headed in by Ukraine captain Andriy Yarmolenko, a particularly cruel way for the visitors to concede having dominated before then.
Both teams tired but threw players forward in a chaotic second half, with Bale wasting a golden opportunity and substitute Brennan Johnson hitting the post for Wales.
Ukraine also had several chances to equalise but were repelled by the phenomenal goalkeeping of Wayne Hennessey and defending of Ben Davies.
This was not a vintage Welsh performance but they played with great resolve, and the scenes of celebration inside a deafening Cardiff City Stadium spoke of how cathartic it is for this footballing nation to rid itself of its 64-year World Cup drought.
Now Wales can finally look forward to being a part of football's greatest competition in November, where England, the United States and Iran await in their group in Qatar.
As for this Ukrainian team, playing to the backdrop of Russia's invasion of their homeland, they have been an inspiration.
They were cheered on in Cardiff by their passionate supporters, including 100 refugees who were given tickets for free by the Football Association of Wales, while home fans showed their appreciation for the away side with warm applause before kick-off.
However, Wales' mantra in the build-up to this game - as cold as it may have sounded - was that they had to take the emotion out of this occasion and temporarily put their compassion to one side.
And they did it to realise their own, long-held dream.
Since their only other World Cup appearance in 1958, Welsh football history has been littered with tales of near misses. From Scotland in 1977 and 1985 to Romania in 1993, Wales have stood on the brink of history before - only to stumble at the final hurdle.
But these are different times. This is Wales' golden era, in which their players are not burdened by that past.
Qualifying for Euro 2016 ended their 58-year wait for a major tournament and reaching a first semi-final in France took Welsh football to new heights.
Then they followed that success by qualifying for Euro 2020 - but a World Cup is another level again.
And while this Wales side might not be shackled by the memories of previous failures, Robert Page's men were never going to make it easy for themselves.
Wales started in a panic, hurrying into tackles and picking up yellow cards for Joe Allen and Daniel James inside two minutes as Ukraine controlled the early exchanges.
The visitors dominated possession and forced Hennessey into a flurry of early saves, while Oleksandr Zinchenko had a goal disallowed after shooting from a free-kick taken too quickly.
While Ukraine's noisy blue and yellow contingent enjoyed their team's vibrant start, a sense of unease spread through the home fans at Cardiff City Stadium.
Their anxiety increased as Zinchenko, orchestrating matters artfully in midfield, called Hennessey into action yet again with a firm left-footed shot from long range.
And yet for all the Ukrainian pressure, it was Bale - who else - who conjured the moment, with some luck, which led to Wales' opening goal.
Peripheral for the first half an hour, the Wales captain lashed a free-kick towards the Ukrainian goal but, as the ball seemed to be drifting wide, it was steered in by the diving Yarmolenko.
Ukraine's skipper thought he would have a chance to redeem himself when he appeared to be tripped by Allen inside the Wales box but, after a VAR check, no penalty was given.
Fortuitous as the goal might have been, Wales' lead meant that Ukraine attacked with abandon in the second half and left themselves vulnerable defensively.
Aaron Ramsey had a glorious opportunity as Kieffer Moore pulled the ball back to him inside the Ukrainian penalty area, but the Juventus midfielder miscued his shot wide.
The game soon become so open it was ragged, both sides exchanging chances like two punch-drunk boxers trading blows.
Hennessey blocked instinctively from Viktor Tsygankov, before Davies slid in to deny Yarmolenko in a goal-saving intervention that brought to mind his block against Slovakia at Euro 2016.
Johnson came on to hit the post and, moments later, Bale could only shoot straight at Ukraine keeper Georgiy Buschchan from close range.
The longer Wales went without scoring a second goal, the more the nerves crept back in as Ukraine exerted more pressure.
Hennessey pulled off a majestic, flying save to deny Artem Dovbyk and, the more time ticked away, the more desperate the Ukrainian attacks became.
Their commitment was faultless but so was Wales' as they held firm to free a nation from its past.