Wales will appear at the World Cup for the first time in 64 years after Andriy Yarmolenko's own goal ensured a 1-0 qualifying play-off final win over Ukraine.
Ukraine marked their first competitive match back after Russia's invasion with a 3-1 play-off semi-final win over Scotland on Wednesday to tee up the winner-takes-all decider in Cardiff.
Oleksandr Petrakov's visitors controlled first-half proceedings but were made to pay when Gareth Bale, with the help of Yarmolenko's head, struck first after 34 minutes.
Wales were largely indebted to the heroics of Wayne Hennessey as Rob Page's team held on to book their spot in Qatar alongside England, United States and Iran in World Cup Group B.
A long-range Viktor Tsygankov drive forced an early save from Hennessey, who tipped over a deflected cross from the Ukraine winger from the resulting corner.
Oleksandr Petrakov's visitors, buoyed on by a vociferous away crowd, continued with their dominance as another smart Hennessey stop denied Roman Yaremchuk as he threatened with a drilled effort.
Hennessey kept out Oleksandr Zinchenko's curler and the Wales goalkeeper's plethora of first-half saves paid dividends, with Yarmolenko heading Bale's goal-bound free-kick past Georgi Bushchan.
Aaron Ramsey angled a glorious chance from Kieffer Moore's cutback wide, while Hennessey kicked away Tsygankov's close-range prod in an entertaining second-half opening.
Ruslan Malinovskiy fired a deflected strike wide as Ukraine searched for an equaliser, with Brennan Johnson hitting the post and Bushchan denying Bale at the other end during a frenetic finish.
Hennessey was again the hero as he produced a fantastic stop against Artem Dovbyk in the closing stages to send Wales to the World Cup.