War-torn Sudan and Benin qualified on Monday for the 2025 Africa Cup of Nations, while there was heartbreak for Rwanda as they shocked Nigeria 2-1 only to lose out.
Sudan drew 0-0 with Group F winners Angola in Benghazi to finish runners-up and claim the second qualifying place.
The Sudanese finished with eight points, one more than Niger, who upset depleted former champions Ghana 2-1 in Accra.
It was even closer in Group D with Benin, who held Libya 0-0 in Tripoli, pipping Rwanda on head-to-head records after both finished with eight points, three less than table-toppers Nigeria.
Benin owe their place in Morocco from December 21 next year to a superior goal difference. Last month, they trounced Rwanda 3-0 at home and lost 2-1 away.
Having changed eight of the team that drew with Benin last week, three-time African champions Nigeria had the upper hand over Rwanda during a goalless opening half in Uyo.
The deadlock was broken on 59 minutes when substitute Samuel Chukwueze evaded several Rwandans in a run from the centre circle before slamming the ball past goalkeeper Fiacre Ntwari.
Needing maximum points to have any chance of finishing second, Rwanda hit back with goals from Ange Mutsinzi and Innocent Nshuti in a three-minute burst.
Mutsinzi equalised on 72 minutes by heading past goalkeeper Maduka Okoye after a free-kick landed in the six-yard area.
Okoye had to pick the ball out of the net again soon after as Nshuti beat the Udinese goalkeeper at his near post with a low shot.
Nigeria brought on reigning African Player of the Year Victor Osimhen after falling behind, but the striker could not add to his two goals in earlier qualifiers.
Civil war
Sudan, forced to play all six matches outside a country engulfed in civil war since April last year, qualified despite a loss of form this month.
Winning and drawing against four-time AFCON title-holders Ghana last month put Sudan five points ahead of the Black Stars and six above Niger with two matchdays remaining.
Ghana were eliminated last Friday after drawing in Angola to become the shock casualties of 2025 qualifying, while Niger hammered Sudan to emerge as unexpected contenders.
Niger, who secured only one point from a possible 12 in four matchdays, maintained a dramatic improvement to snatch victory in Ghana through an added-time header from Oumar Sako.
Ousseini Badamassi put Niger ahead midway through the first half and Jeremia Afriyie levelled halfway into the second half for Ghana, who lacked many injured first choices.
Sudan and Benin swelled the number of finalists to 21, leaving three places to be filled on Tuesday, the final day of qualifying.
Botswana or Mauritania will advance from Group C, Guinea or Tanzania from Group H and Mozambique or Guinea-Bissau from Group I.
Only pride was at stake in five other matches with group qualifiers having already been decided. The biggest surprise was the Gambia beating Tunisia 1-0 in Rades.
Brahim Diaz scored a first-half hat-trick as 2022 World Cup semi-finalists Morocco thrashed Lesotho 7-0 in Oujda to be the only team to win all six matches.
The Real Madrid midfielder was the second player to claim a treble in a 2025 qualifier after Borussia Dortmund striker Serhou Guirassy for Guinea.