Wales picked up a point versus Belgium and this was enough for them to finish second in their World Cup qualifying group.
Man City star Kevin De Bruyne opened the scoring for Belgium but Kieffer Moore was able to bring Wales level before the break.
The Dragons had already earned themselves a play-off spot, but a draw was needed to secure a home tie in the semi-finals.
Ronaldo and Messi in a most-capped international XI
The point was enough to finish above the Czech Republic and take their place among the six seeded teams in the play-offs.
Turkey needed to win by four goals in Montenegro to deny Wales a home tie but could only manage a 2-1 victory.
Aaron Ramsey captained Wales in the absence of Gareth Bale, who had been ruled out by injury.
Bale won his 100th cap against Belarus on Saturday, the Real Madrid forward’s first game for two months following a hamstring tear, but was withdrawn at half-time of that 5-1 victory after appearing a long way short of match fitness.
The loss of Bale, who was watching the game among the Wales substitutes, saw Moore return to the starting line-up following suspension.
Ethan Ampadu was banned after picking up two bookings and Wales were walking a disciplinary tightrope ahead of the play-offs.
Six players in the matchday squad were one yellow card away from suspension and missing the play-off semi-final in March.
In the event, Joe Morrell was the only player to pick up a second yellow card and will sit out the semi-final.
Belgium, missing Eden Hazard, Romelu Lukaku, Thibaut Courtois and Youri Tielemans, had a proud record to protect.
The Red Devils had not lost any of Roberto Martinez’s 27 European Championship and World Cup qualifiers in charge – 25 wins and two draws – and the Spaniard had insisted the world’s top ranked team’s weekend qualification for Qatar 2022 would not diminish their motivation.
Divock Origi gave Wales a warning from 25 yards before Belgium went ahead through a sweet De Bruyne strike.
Axel Witsel’s shot was blocked after some pinball in the Wales penalty area and Manchester City midfielder De Bruyne wasted no time finding the bottom corner from 20 yards.
Belgium’s possession football was breathtaking at times, limiting to Wales just 28 per cent of the ball, with De Bruyne at the heart of it in a false nine role.
Wales players were being pulled out of position and De Bruyne fired over on his weaker left foot as Belgium sensed the kill.
But the hosts equalised with their first shot of the game after 32 minutes as Ben Davies found the speedy Daniel James down the left. The Leeds winger’s first cross was blocked but Arthur Theate made a hash of his second effort and Moore worked the ball on to his right foot to score his eighth Wales goal.
Belgium almost reclaimed the lead when De Bruyne floated a free-kick to the edge of the area and Thorgan Hazard lashed a volley against the far post.
Wales started the second period on the front foot and Morrell gave Koen Casteels some catching practice in the visitors’ goal.
Neco Williams’ energy down the left was giving Belgium problems, but the Liverpool full-back was temporarily slowed after colliding with Ramsey and required treatment.
Belgium made several substitutions and it seemed to hinder their fluency with Wales now asking as many questions.
Moore’s shot was blocked and Belgium were starting to creak down their right where James and the rampaging Williams attacked at every opportunity.
Williams cut inside substitute Leander Dendoncker 25 yards out to to force a flying save from Casteels and Wales held on in a pulsating finale.