Egypt survived a scare to claim a 2-2 draw away to Angola and become the fourth side to win their group in the African World Cup qualifiers and progress to March's playoffs that will decide the continent's five teams at the World Cup in Qatar next year.
Egypt rallied from two goals down to secure the point they needed to ensure they win Group F with a game to spare, moving to 11 points from five matches and an unassailable four-point lead at the top of the standings.
But Mohamed Elneny pulled a goal back just before halftime and Akram Tawfik grabbed the equaliser after an hour, much to the relief of new Egypt coach Carlos Queiroz, as they joined Mali, Morocco and Senegal in the next stage.
Gabon's Pierre-Emerick Aubameyang scored a second-half penalty as they moved into second place in the group with a 1-0 home win over Libya.
African champions Algeria kept their destiny in their own hands with a 4-0 drubbing of minnows Djibouti in Group A.
The victory leaves Algeria two points ahead of second-placed Burkina Faso, with the two teams set to clash in a winner-takes-all final qualifier in Blida on Tuesday, where the north Africans will advance if they avoid defeat.
Algeria rested a number of regulars on Friday but never looked like dropping points as Youcef Belaili put them ahead on the half-hour mark having missed a penalty moments earlier.
Burkina Faso could only manage a 1-1 draw with Niger in neutral Marrakech, with the latter ahead after 11 minutes through a Youssef Oumarou penalty. The Burkinabe equalised early in the second half through Issoufou Dayo, also from the spot.
Morocco's Belgian-born Ryan Mmaee scored twice and Imran Louza got the other goal as they eased to a 3-0 win over Sudan to maintain their 100% record in Group I.