For the first time in more than a year, Wales coach Ryan Giggs was able to start both Gareth Bale and Aaron Ramsey for the national team.
The country’s two superstars combined to propel the Welsh into another European Championship.
Ramsey headed home a cross from Bale in the first half and added a second goal soon after halftime to guide Wales to a 2-0 victory over Hungary in a winner-takes-all match in Cardiff on Tuesday.
Wales climbed from fourth to a second-place finish in Group E behind Croatia, leaving Hungary to attempt to get to the finals via the playoffs in March. Slovakia, which beat Azerbaijan 2-0 on Tuesday, finished in third place and will also contest the playoffs.
It will be a second straight Euros for the Welsh, after 2016 in France when they reached the semifinals in their first major tournament in 58 years. That was under Chris Coleman and now they are coached by Giggs, who has delivered in his first qualifying campaign.
Wales could be a threat at the Europe-wide tournament held in June and July next year, with its forward line containing Real Madrid’s Bale and Manchester United’s Daniel James while Ramsey — now at Juventus after leaving Arsenal in the off-season — makes runs from midfield.
Much will hinge on the fitness of Bale and Ramsey, who are both injury prone. This was the first time they started together for Wales since a Nations League qualifier against Denmark last November.
"We had the best time of our lives in France so we wanted to make sure we got there again," Ramsey said. "I missed a lot of this campaign but I’ve chipped in now and it’s worthwhile."
Bale was given time and space to curl in a left-footed cross from the right wing that Ramsey met at the far post to head high into the net. Ramsey’s second goal, in the 47th, was a cool finish from close range after he latched onto an acrobatic effort by substitute Kieffer Moore.
"It’s about time he contributed!" Bale said jokingly about Ramsey. "He’s a world class player, it’s great to have him back and his goals helped us through."
The Slovaks could have qualified in second place if the Wales-Hungary match had finished in a draw. They did all they could, winning in Trnava courtesy of Robert Bozenik’s 19th-minute goal and another from Marek Hamsik in the 86th.
On the final night of qualifying, top-ranked Belgium completed a perfect campaign in Group I by thrashing Cyprus 6-1 for a 10th straight win.
Christian Benteke and Kevin De Bruyne both scored twice, with Yannick Carrasco also on the score sheet and Christoforou Kypros scoring an own goal.
Belgium was the most prolific team in qualifying, scoring 40 goals from 15 different players. Roberto Martinez’s side also conceded just three goals.
Russia beat San Marino 5-0 and finished second, with its only losses coming against Belgium.
Germany and Netherlands were already assured of advancing from Group C and they both finished with big home wins.
Serge Gnabry scored a hat trick and Leon Goretzka added two more for Germany in its 6-1 win over Northern Ireland in Frankfurt.
Georginio Wijnaldum, standing in as captain, also scored three goals in the Netherlands’ 5-0 victory over Estonia.
Germany topped the group, two points ahead of the Dutch.