Bafana Bafana will be present for the first time since hosting the World Cup in 2010, after a tense battle in Group C.
Benin, chasing a maiden World Cup appearance, started the last round of matches at the summit of Group C, two points ahead of South Africa and three in front of Nigeria.
But the team led by former Super Eagles coach Gernot Rohr fell to a 4-0 defeat away in Uyo, with Victor Osimhen grabbing a hat-trick for the hosts, a result that saw the Cheetahs slip to third, below their opponents on goal difference.
That opened the door to the South Africans, and Bafana Bafana capitalised as they eased to a 3-0 home win over Rwanda.
Thalente Mbatha fired home in the fifth minute, Oswin Appollis whipped in a second midway through the first half and Evidence Makgopa headed in the third in the 72nd minute in Mbombela.
South Africa become the seventh African team to reach the expanded 48-team finals, joining Morocco, Tunisia, Egypt, Algeria, Ghana and Cape Verde.
There will be relief that the 3-0 forfeit imposed by Fifa for fielding an ineligible player in their victory over Lesotho in March has not cost them.
That decision, announced earlier this month, saw Bafana drop from the top of the group to second, behind Benin on goal difference, heading into the final two rounds of preliminaries.
Hugo Broos' men let two more points slip when they failed to beat bottom side Zimbabwe in a nominal away game in front of a pack Durban crowd on Friday - but Benin's defeat in the West African derby gave his side a chance to redeem themselves against the Wasps.
Africa's final two automatic qualifying spots, either Senegal or DR Congo from Group B and Ivory Coast or Gabon from Group F, will be decided later on Tuesday.
Nigeria, meanwhile, could still reach next year's tournament via an arduous route potentially involving an extra four matches.
Victory was enough for the Super Eagles to secure one of four spaces in next month's African play-offs, with the overall winner of that progressing to Fifa's final six-team inter-continental qualifier which is scheduled to be held next March.
Those games will decide the last two qualifiers for the expanded 48-team World Cup in Canada, Mexico and the United States.
wezacestuy
38
3 points was deducted but still top the group, Well done bafana bafana🇿🇦
ShengePS
14
One nation🇿🇦 one Song🎵 One Beer 🍺 One goal 🥅