“It’s about time he contributed, isn’t it?” a smirking Gareth Bale said, putting his arm round the shoulder of Aaron Ramsey, who scored twice on his first Wales start for more than a year to steer his country to Euro 2020.

Soon afterwards Bale, drowned out by the blaring sound of Feeder’s Buck Rogers, was cavorting round the pitch amid a carnival atmosphere in Cardiff. He was waving a flag decorated with the words “Wales. Golf. Madrid. In that Order” after he and his teammates charged at the Canton Stand before performing a synchronised belly flop in front of fans revelling in reaching a third tournament finals.

Ramsey applied the finishing touches on a memorable night, propelling Ryan Giggs’s side past a Hungary side outclassed from start to finish to earn their place at a second successive European Championship.

The plan on Saturday – when Wales won in Azerbaijan to take automatic qualification back into their own hands – was for Ramsey to replace Bale after an hour and by the time the latter was withdrawn against Hungary, the perfect scenario had again played out. Giggs craved a fearless display and his youthful team delivered, performing with gusto. The returning Ramsey and Bale started together for the first time in 368 days – and how they enjoyed themselves.

There was an air of inevitability that Ramsey would prove the hero on his return to the starting lineup. With 47 minutes played, his wonderfully taken goals had Wales purring and in the driving seat. If Ramsey was the protagonist, Bale was the architect. When the opener came, it had to be Ramsey via a gorgeous Bale cross; of course they would combine on the country’s biggest occasion since the defeat by Portugal in the Euro 2016 semi-finals.

A Wales flag in the crowd. Gareth Bale later celebrated with it. Photograph: Andrew Boyers/Action Images via Reuters

Joe Allen fed Connor Roberts, who slid in Bale down the right. Bale whizzed to the byline, darting inside Adam Lang before curling a delicious left-foot cross for an unmarked Ramsey. He powered a header beyond Peter Gulacsi in the Hungary goal, sending Cardiff into a frenzy. Bale’s wonderful cross seemed to hang in the air for a lifetime but Ramsey made no mistake.

Long before the end, stirring renditions of Hen Wlad Fy Nhadau echoed round the stadium as supporters prepared to dust off the atlas in anticipation of another European tour. Wales performance was brave, courageous and convincing, a display worthy of the occasion.

Croatia’s victory over Slovakia on Saturday wrestled fate back in Wales’ favour but, when it came to securing the required outcome, it was down to Giggs’ vibrant young group to produce.

Aaron Ramsey rises to give Wales the lead from Gareth Bale’s cross. Photograph: Kieran McManus/BPI/REX/Shutterstock

It was not only Ramsey’s first Wales start for more than a year that was a huge fillip for Giggs, who made two changes. Joe Morrell, the midfielder on loan at League One Lincoln, again did not look out of place, while Allen returned with authority from suspension.

The Wigan striker Kieffer Moore, who joined non-league Forest Green Rovers the same summer Wales made friends at Euro 2016, impressively led the line. Meanwhile staples from the European campaign in France, namely Chris Gunter, Ashley Williams and Sam Vokes, again warmed the bench.

On the half-hour Ramsey was the catalyst for a slick Wales counter-attack that culminated in Moore heading inches wide from another wicked Bale ball from the right. It was always likely to be a chastening evening for Zsolt Nagy, the Hungary defender making his full debut. and Bale made a point of tormenting him.

The visitors had one golden chance, when Wayne Hennessey made a heroic double save to deny Dominik Szoboszlai and shut out Roland Sallai’s relatively tame rebound but it was in effect game over less than two minutes after the interval. Wales doubled their advantage when Ramsey kept his cool to fire in at the back post after feeding off the scraps of a Ben Davies free-kick. The selfless Moore was influential, hooking the ball into the direction of the Juventus midfielder via Chris Mepham, who shielded his marker, allowing Ramsey to finish. Bale almost made it three with a free-kick that flashed over.

Quick Guide Euro 2020: qualifiers and play-offs Show Who has qualified for the finals?

Austria, Belgium, Croatia, Czech Republic, Denmark, England, Finland, France, Germany, Italy, Netherlands, Poland, Portugal, Russia, Spain, Sweden, Switzerland, Turkey, Ukraine and Wales. And thanks to the draw restrictions, some of the groups are already taking shape. Belgium, Russia and Denmark will be three of the four teams in Group B, for example. England are in Group D but do not yet know any of their opponents, though Scotland will join them in the group if they qualify. What is the play-off lineup? Path A: Iceland v Bulgaria/Israel/Hungary/Romania, Bulgaria/Israel/Hungary/Romania v Bulgaria/Israel/Hungary/Romania Path B: Bosnia and Herzegovina v Northern Ireland (Zenica, 26 Mar), Slovakia v Republic of Ireland (Trnava, 26 Mar) Path C: Scotland v Bulgaria/Israel/Hungary/Romania (Hampden, 26 Mar), Norway v Serbia Path D: Georgia v Belarus, North Macedonia v Kosovo Friday’s draw will decide which three of Bulgaria, Israel, Hungary and Romania join Iceland in Path A and who gets to face Scotland in Path C. The draw will also determine the potential home teams in each path final. The play-offs – one-leg semi-finals and finals – take place on 26 and 30 March 2020. When are the draws?

The play-off draw is in Nyon at 11am on Friday and the finals draw is in Bucharest on Saturday 30 November.

Bale suggested Wales’s attacking armoury is stronger than three years ago and they caused havoc for Hungary from all areas, be it Moore, a constant out-ball, Daniel James, the Manchester United winger who almost put the gloss on things with a curling effort, or one of the usual suspects.

Giggs’s vibrant side relished every minute without being reckless or overzealous, with the teenage substitute Ethan Ampadu showing a maturity that belied his years. Roberts, too, hoovered up in key moments.

James sped beyond Gergo Lovrencsics late on, presenting Ramsey with an inviting chance to mark his flawless return with a hat-trick but Gulacsi saved with his legs. By then, though, the Welsh party had started.