Mohamed Ali Ben Romdhane sent Tunisia to the World Cup with a goal in the fourth minute of injury time that secured a 1-0 win over Equatorial Guinea on Monday in qualifying.
Romdhane was teed up by fellow substitute Firas Chaouat and sparked wild celebrations for the visitors on the track behind the goal.
Tunisia needed a win to secure a spot at next year's tournament in North America with two games to spare. They top Group H with 22 points from eight games, 10 points ahead of second-placed Namibia, which has a game in hand. Tunisia has yet to concede a goal in qualifying.
It is the seventh time Tunisia have qualified for the World Cup, and third in a row. They went out in the group stage in 2018 and 2022.
In another Group H match, Malawi came back from two goals down to draw with Liberia 2-2 with goals from Gabadinho Mhango and Chawanangwa Kaonga in the 72nd and 80th minutes.
In Group G, Algeria played to a goalless draw at Guinea and remained top of the group with 19 points, four more than Uganda. Uganda kept up the pressure by beating Somalia 2-0 to be level on 16 points with Mozambique.
Madagascar clinched a convincing 3-1 win against Chad to be on 16 points, second to Ghana in Group I. Ghana boosted their hopes of qualifying as the group winner by topping Mali 1-0 in Accra.
Morocco, who have already qualified, made it seven wins out of seven matches after a 2-0 result at Zambia. Guinea-Bissau beat Djibouti 2-0.
Libya defeated Eswatini 2-0 in Group D to be on 14 points, two behind leader Cape Verde, which has a game in hand.