Wales will play in a World Cup for the first time since 1958 after an Andriy Yarmolenko own goal gave them a 1-0 victory over Ukraine in the pair's second-round qualification playoff on Sunday evening.
In a thoroughly entertaining and emotionally-charged contest, Ukraine peppered their opponents' goal throughout and perhaps should have had a penalty. But in the end the neutrals' favourites were thwarted by some determined defending and fantastic saves from Wayne Hennessey.
The only goal of the game came 11 minutes before the break with Yarmolenko heartbreakingly diverting the ball into his own net from a Gareth Bale free kick. Wales will be joined by England, USA and Iran in Group B at the World Cup later this year.
Ukraine had the ball in the back of the net with little over two minutes on the clock, but eccentric referee Antonio Mateu Lahoz disallowed the goal as Oleksandr Zinchenko took the free kick too quickly.
Roman Yaremchuk enjoyed the first clear sight of goal from open play, springing the Welsh offside trap and drawing a full-stretch save from Wayne Hennessey - who was busy in the opening exchanges.
Ukraine's next opportunity fell to right-back Oleksandr Karavaev, who failed to make clean contact with Victor Tsigankov's cross from inside the box. Soon after Zinchenko forced Hennessey into action again with a well-struck long-range effort.
Despite all of Ukraine's early pressure, it would be the hosts who opened the scoring just after the half-hour mark. Bale drove a free kick into the danger area and Ukrainian captain Yarmolenko had a nightmare, heading the ball past a stricken Georgiy Buschan.
Just minutes later, Yarmolenko thought he might have made amends for his error when he was brought down in the box by Joe Allen, but surprisingly no penalty was given following a VAR review.
Wales came out of the blocks quickly after the interval, piecing together an incisive team move that Aaron Ramsey should have finished inside three minutes.
Ukraine soon responded with Vitaliy Mykolenko fizzing a low cross for Tsiganov to prod straight at Hennessey from close range - and Yaremchuk could not score on the rebound either.
Malinovskyi then drew gasps from the Red Wall when his long-range effort fizzed narrowly wide of the post.
15 minutes from time Brennan Johnson - who had only just come on as a substitute - rattled the post and this was soon followed by Bale being denied by the much-criticised Buschan from close range.
This stop was then topped by an even better save from Hennessey. Mykolenko swung in brilliant cross and Zinchenko made clean contact with his head, only for the Burnley backup goalkeeper to stick up his hand and prevent the equaliser.
Ukraine kept on pushing until the final whistle with Yarmolenko thrashing over in the closing throws but it was to be Wales' day - much to the delight of the supporters packed inside the Cardiff City Stadium.
Here are your player ratings from the Welsh capital...
Wales player ratings (4-4-2)
Wayne Hennessey (GK) - 10/10 - Very busy in the first half, making a string of saves and batting away crosses. His save near the end sent Wales to their first World Cup nearly 70 years.
Ethan Ampadu (CB) - 6/10 - Seemed to struggle positionally, playing Yaremchuk onside early on. Settled down as things progressed.
Joe Rodon (CB) - 7/10 - Better than Ampadu but not quite as good as Davies. Made a couple of important interventions.
Ben Davies (CB) - 9/10 - Caught dawdling on the ball in the first half. Made an incredible tackle to deny Yarmolenko a near certain goal on the hour. Colossal in the second half.
Conor Roberts (RWB) - 5/10 - Caught out defensively in the first half once or twice. Hit and miss going forward.
Aaron Ramsey (CM) - 6/10 - Broke forward into the wide areas at times and looked dangerous. Should have looked after the ball better on occasion. Missed a big chance at the beginning of the second half.
Joe Allen (CM) - 5/10 - Picked up a yellow card inside two minutes. Unbelievably lucky not to concede a penalty.
Neco Williams (LWB) - 8/10 - A positive display. He was aggressive and strode forward to great effect at times. Some great covering too.
Gareth Bale (RW) - 6/10 - Was dealt with well early on but created the goal from a free kick. Could have put the game beyond doubt near the death.
Kieffer Moore (ST) - 6/10 - Did not get the right service in the first half. Would have got an assist just after the break if Ramsey could finish better.
Dan James (LW) - 7/10 - Also picked up an early booking and ran down quite a few dead ends before throwing himself to the floor. There were good moment too though, and he improved considerably in the second half.
SUB: Brennan Johnson - 7/10 - Made a near-instant impact by hitting the post. Added energy.
SUB: Harry Wilson - N/A
Ukraine player ratings (4-1-4-1)
Georgiy Buschan (GK) - 7/10 - Flapped at a few crosses early on and then picked up a knock. Battled on and made a very impressive save from Bale near the end.
Oleksandr Karavaev (RB) - 6/10 - Bombed forward to good effect in the first half. Not quite as effective as things progressed.
Illia Zabarnyi (CB) - 7/10 - Stood firm and mopped up a Wales' through balls. Did very little wrong.
Mykola Matvienko (CB) - 7/10 - Pretty much spotless defensively and distributed well from the back.
Vitaliy Mykolenko (LB) - 6/10 - Booked for a naughty body check on James in the first half when his elbow made contact with the Leeds man's face. Had his moments in the opposite direction.
Taras Stepanenko (DM) - 6/10 - Had an okay game. Nothing too flashy but did not make any major errors.
Andriy Yarmolenko (RM) - 5/10 - Had a complete nightmare with the opener. Should have been awarded a penalty before the break.
Ruslan Malinovskyi (CM) - 6/10 - Conceded the foul that led to Wales' opening goal - and it was not really necessary. Mistimed quite a few tackles but was always a threat from long-range.
Oleksandr Zinchenko (CM) - 7/10 - Not as dominating as he was in the Scotland game but still buzzed around all over the place trying to get Ukraine into scoring positions.
Viktor Tsygankov (LM) - 6/10 - Got into some promising areas early on and put in some good crosses.
Roman Yaremchuk (ST) - 5/10 - Timed his runs to beat the Welsh defense several times. Presented with a great chance in the second half but could not get his feet set.
SUB: Mykola Shaparenko (CM) - 6/10 -
SUB: Serhiy Sydorchuk (DM) - 6/10 -
SUB: Artem Dovbyk (ST) - N/A