Angola secured a 1-0 victory over Botswana to book a place in the 2019 Africa Cup of Nations finals in Egypt.
Going into the final Group I game, Angola were second in the standings with nine points, two behind Mauritania and Burkina Faso who played against each other.
Botswana had already been eliminated and were keen to end their qualifying campaign with a victory at home, but it did not happen.
Wilson Eduardo scored the all-important goal in the 21st minute to send Palancas Negras to AFCON finals, which begins on 7 July.
In another Group I match, Burkina Faso ended their campaign on a positive note with a 1-0 win over Mauritania.
Bertrand Traoré scored in the 19th minute with a wonderful volley beating Brahim Souleimane between Al-Murabitun goal posts.
The Stallions went into the match still in with a chance of securing their 12th AFCON appearance, though their fate was in their own hands.
They needed to defeat Mauritania (who have already qualified) and hope that already-eliminated Botswana avoid defeat, to seal a place at Egypt 2019.
The results in both matches saw Stallions fail to qualify as they finished third in group standings with ten points, while Mauritania ended the campaign second with 12 points, behind Angola also on 12 points.
Botswana finished bottom of the standings on one point after five losses and one draw in a disastrous qualifying campaign.
In Group E, Nigeria beat a much improved Seychelles 3-1 in Asaba to end the qualifiers top of the standings.
Odion Ighalo scored a first-half penalty kick, while Henry Onyekuru and Moses Simon scored in the second half for Nigeria. Boby Melaine had drawn the visitors level in the 41st minute.
Morocco and Tunisia, North African countries who have each won the Cup of Nations once, sealed first place in other groups through contrasting results.
The Atlas Lions were held to a goalless stalemated by host Malawi in a dead rubber played at the Kamuzu Stadium in Blantyre.
The result moves Morocco up to 11 points in the group, three clear of Cameroon who host Comoros in Yaounde on Saturday.
For Tunisia, they thumped eSwatini 4-0 to complete a double over the Cosafa side having defeated their visitors 2-0 in Manzini last year.
Syam Ben Youssef, Anice Badri, Naim Sliti and Yassine Meriah netted for the Carthage Eagles, who are now at 15 points, with the other group action set to be between second-placed Egypt and Niger on Saturday.
In another dead rubber, Equatorial Guinea put up a fine display to beat Sudan 4-1 at the Al-Hilal Stadium.
The result saw Nzalang Nationale finish third in Group A behind already qualified Senegal and Madagascar who will be in action on Saturday.
Spanish born Emilio Nsue netted a brace for the visitors with other goals coming from Pablo Ganet and Pedro Obiang, who was controversially swooped to turn for Equatorial Guinea years ago.
Elsewhere in Group D, Algeria were held to a 1-1 draw by Gambia in a match played at the Stade Mustapha Tchaker.
As a result, the Desert Foxes end their successful qualifying campaign with a draw, while the Scorpions failed to qualify for the finals.
Mehdi Abeid scored for the hosts two minutes before the end of first half, through a powerful shot from a tight angle to beat Scorpions goalie Madou Jobe.
Futty Danso grabbed a late equalizer for Gambia in the stoppage time but the goal was not enough as the West Africans needed a win to qualify for the finals.
However, they still stand a chance due to an appeal that they filed at Court of Arbitration of Sports (CAS) over the eligibility of Togo defender Adewale Olufade, who played in the game between the two countries in October.