Benin were in a three-way tussle for second place in Group D with opponents Libya and Rwanda.
Benin saw off the threat of Libya with a stalemate in Tripoli and pipped Rwanda on their head-to-head record.
Rwanda pulled off a shock 2-1 away win against Nigeria in Uyo, coming from behind and scoring twice in three minutes late on through Jimmy Mutsinzi and Innocent Nsuthi, who plays semi-professional for a club in the US.
Niger embarrass Ghana
Nigeria under caretaker Austin Eguavoen, who is their third coach this year, made several changes to the lineup after drawing 1-1 away to Benin last week but the result will likely hasten slow-moving plans to hire a foreign coach. Nigeria had already qualified for the AFCON 2025.
Sudan needed one point from their last two Group F fixtures to qualify behind Angola but made heavy work of it, losing 4-0 to Niger on Thursday before drawing with the Angolans in neutral Benghazi on Monday.
Niger had only slim hopes of overhauling Sudan but kept up the pressure as they condemned heavily fancied Ghana to last place in the group with a shock 2-1 win in Accra.
Ghana had already been eliminated after a horror campaign, ending run of 10 successive tournament appearances, and their woes continued as Ousseni Badamassi put Niger ahead at halftime, only for debutant Jeremia Afriyie to equalise.
Niger then got a shock second goal two minutes into stoppage time as Oumar Sako headed home from a free kick and Ghana’s misery was complete when Mohammed Kudus missed a penalty.
More matches ahead
Tunisia had already qualified but were toppled from first place in Group A as the Gambia upset them with Abdoulie Ceesay netting a 17th minute winner in Tunis.
Tunisia had also lost their previous home qualifier to the tiny Comoros Islands, who took top spot when they beat fellow Indian Ocean islanders Madagascar 1-0.
Morocco's Brahim Diaz scored a hat-trick in a resounding 7-0 win over Lesotho as the 2025 Cup of Nations hosts, who are also participating in the qualifiers, concluded their six Group B fixtures with a 100% record and 26 goals with two conceded.
The last three places in the 24-team finals will be decided on Tuesday with a total of 13 qualifiers scheduled but only four of them of any consequence.