Match ends, Wales 2, Andorra 0.
Wales finished their historic Euro 2016 qualifying campaign with a patchy win against Andorra - but that did not detract from the party atmosphere at a delirious Cardiff City Stadium.
Having already secured their place at a first major tournament since the 1958 World Cup, Chris Coleman's side were dominant but frustrated by diligent Andorran defending in a goalless first half.
The breakthrough finally came five minutes after the interval, as Aaron Ramsey fired in a rebound after Ashley Williams's header was saved.
Gareth Bale struck his seventh goal of the campaign with five minutes left as Wales finished second in Group B following Belgium's win against Israel.
Wales had ended their long and painful absence from major tournaments in strange circumstances on Saturday, losing 2-0 in Bosnia-Herzegovina but qualifying thanks to Israel's 2-1 defeat by Cyprus.
The Welsh players, coaches and fans in Zenica did not care how they reached Euro 2016, so deprived of success had they been over the past half a century.
But after the initial celebrations had subsided, attention turned to Andorra's visit and the opportunity to toast their achievement with their home crowd at a sold-out Cardiff City Stadium.
Party first, match second
With Welsh band Super Furry Animals playing a three-song set before kick-off and the home fans rattling through their repertoire of chants at full volume, the match almost seemed secondary to the jamboree in the stands.
It is just as well the atmosphere was so charged - because the action on the pitch offered little excitement in the first half.
There was a lengthy stoppage early on as Andorra's Victor Moreira departed on a stretcher following a clash of heads with James Chester.
Although Wales monopolised possession, they were thwarted by the dogged determination of an Andorran side who had never won a competitive game away from home.
The home fans did not seem overly concerned, however, as they continued to bask in the glory of qualification - and the opening goal arrived five minutes into the second half.
Captain Williams' header was palmed away by Andorra goalkeeper Ferran Pol, but Ramsey was on hand to fire the rebound into the net from a tight angle.
Wales continued to exert total control and doubled their lead late on as Bale collected Ben Davies's low cross and shot into the bottom corner.
No mishaps this time
Even with the slow start, this was a far cry from Wales's opening match of the campaign in Andorra.
In that fraught fixture, Wales fell behind to the minnows' first competitive goal for four years and were in danger of becoming only the second team in history to lose a qualifier against the Catalan principality.
Coleman was booed at half-time but, thanks to Gareth Bale's two goals, Wales escaped with a precious three points which laid the foundation for their campaign.
Although Andorra proved resolute once again, the match in Cardiff was in stark contrast as the home crowd stayed inside the stadium en masse after the final whistle to pay tribute to Coleman and his players.
Wales settle for second spot
Wales started the final round of games second in Group B and would have finished top if Belgium had slipped up.
They didn't. A team including Manchester City pair Vincent Kompany and Kevin De Bruyne ran out 3-1 winners at home to Israel.
Belgium ended the 10-match campaign with 23 points, Wales on 21. Bosnia-Herzegovina advance to the play-offs after winning 3-2 away to Cyprus.
What happens now?
Wales have already started their preparations for Euro 2016, twice visiting France in recent months to look at potential training bases.
Although Coleman's side recently rose to an all-time world ranking high of eighth, the nature of Uefa's coefficient ratings mean they will be among the bottom group of fourth seeds for the tournament, potentially leading to a difficult draw.
This Welsh side will not be fazed by illustrious opponents, though. Coleman and captain Williams have described their team as fearless, ready to embrace the pressures and challenges which come with their newfound success.
Man of the Match - Aaron Ramsey
What they said
Wales boss Chris Coleman on the crowd: "These supporters have been absolutely incredible. I've never seen anything like it. I played for Wales for some time, managing for some time, but the support we've had this campaign - home and away - has been absolutely fantastic. They've helped us get over the line."
Wales captain Ashley Williams on Chris Coleman: "I can assure you whenever we've gone out on the field he's got us right up for the game. We enjoy the camps, he makes them enjoyable.
"If you ask any of the guys in there we always try and perform for him. We feel disappointed for him when we lose. He deserves all the credit he gets."
Best of social media
- 2GunterBooked at 57mins
- 6WilliamsBooked at 57mins
- 13WilliamsSubstituted forChurchat 86'minutes
- 20VaughanBooked at 33mins
- 9Robson-KanuSubstituted forEdwardsat 23'minutesSubstituted forLawrenceat 45'minutes
- 12Fon Williams
- 13PolBooked at 65mins
- 3San Nicolás
- 15RodriguesBooked at 78mins
- 6Lima SolaBooked at 15mins
- 19LorenzoBooked at 49minsSubstituted forGarcíaat 81'minutes
- 4SonejeeSubstituted forAyala Diazat 70'minutesBooked at 82mins
- 8VieiraBooked at 57mins
- 17MoreiraSubstituted forRieraat 12'minutes
- 10SanchezBooked at 51mins
- 1Gomes Moreira
- 18Ayala Diaz
- Kevin Blom
- Shots on Target
Second Half ends, Wales 2, Andorra 0.
Attempt saved. Sam Vokes (Wales) header from the centre of the box is saved in the bottom right corner. Assisted by Ashley Williams with a cross.
Corner, Wales. Conceded by Marcio Vieira.
Foul by Simon Church (Wales).
Marc García (Andorra) wins a free kick on the left wing.
Foul by Simon Church (Wales).
Marc García (Andorra) wins a free kick in the defensive half.
Goal! Wales 2, Andorra 0. Gareth Bale (Wales) left footed shot from the centre of the box to the bottom right corner. Assisted by Aaron Ramsey.
Substitution, Wales. Simon Church replaces Jonathan Williams.
Attempt missed. Aaron Ramsey (Wales) header from the centre of the box is high and wide to the right. Assisted by Ben Davies with a cross.
Josep Ayala (Andorra) is shown the yellow card for a bad foul.
David Vaughan (Wales) wins a free kick in the defensive half.
Foul by Josep Ayala (Andorra).
Substitution, Andorra. Marc García replaces Iván Lorenzo.
Attempt saved. Tom Lawrence (Wales) right footed shot from outside the box is saved in the bottom right corner. Assisted by James Chester.
Attempt saved. Sam Vokes (Wales) header from very close range is saved in the centre of the goal.
Attempt saved. Ashley Williams (Wales) header from the centre of the box is saved in the bottom right corner. Assisted by Aaron Ramsey with a cross.
Adrián Rodrigues (Andorra) is shown the yellow card for a bad foul.
Ben Davies (Wales) wins a free kick in the attacking half.