Angola beat Botswana 1-0 on Friday courtesy of a soft Wilson Eduardo goal to join 14 teams who had already qualified for the 2019 Africa Cup of Nations in Egypt.
Needing a win to be sure of finishing above Burkina Faso in group I and joining first-time qualifiers Mauritania, Angola succeeded through a 21st-minute goal in Francistown.
The ball rebounded off the crossbar to Braga’s Eduardo, whose weak shot eluded three defenders en route to the net.
Burkina Faso edged Mauritania 1-0 in Ouagadougou through a first-half goal from Bertrand Traore, but had to settle for third place.
Angola and Mauritania finished with 12 points each from six matches, Burkina Faso 10 and Botswana one.
Earlier, Nigeria needed a last-minute Moses Simon goal to seal a 3-1 home win in a Group E dead-rubber.
Rody Melanie equalised before halftime following goalkeeper Francis Uzoho’s error to cancel Odion Ighalo’s opener from the spot.
Henry Onyekuru put Nigeria ahead again on 50 minutes with a fine header, and despite dominating possession, the Eagles needed a stoppage-time goal from substitute Moses Simon to seal the win.
Winning assured Nigeria of first place in the group and South Africa will also go to Egypt provided they avoid defeat away to Libya on Sunday.
Morocco and Tunisia, North African countries who have each won the Cup of Nations once, sealed first place in other groups.
The woodwork denied Morocco several times as they drew 0-0 away to already-eliminated Malawi in a Group B game marred by some spectators flinging missiles onto the pitch.
Tunisia trounced eSwatini (formerly Swaziland) 4-0 in a group J match that marked the debut of 1980s France midfield star Alain Giresse as coach.
Earlier in the day, Emilio Nsue (twice), Pablo Ganet and Pedro Obiang scored for Equatorial Guinea in a 4-1 group A romp away to Sudan with only pride at stake.