Nigeria led 1-0 going into the second leg in Niamey, but succumbed in extra-time to bow out of a competition they have dominated in the past.
Ghana squeezed into the the final round of qualifying despite a 4-1 loss in Benin. Ghana had won the first leg 5-1 to take the toe 6-5 on aggregate, but they were given a few heart-stopping moments on Saturday.
Senegal had a smoother path after winning both legs against Tunisia 3-2 to advance 6-4 on aggregate, while Cameroon won 2-1 in Kenya to secure a 9-1 aggregate success.
Ivory Coast needed extra-time but ended up beating Benin 3-1 to secure a 4-2 success in their tie.
The Comoros Islands surprised COSAFA rivals Mozambique with a 3-0 away win to secure a 5-1 aggregate win, while Angola defeated Mauritius by the same scoreline to win 4-0 over the two legs.
South Africa will play Tanzania on Sunday in Dar es Salaam having been held to a 1-1 draw at home in the first leg.
They will face the winner of the tie between Namibia and Congo in the final round of qualifying if they advance. Congo lead that tie 2-1 with the home leg to come on Sunday.