Zimbabwe have qualified for their third successive Africa Cup of Nations after Zambia were held to a 3-3 draw at home to Algeria.
The result followed Zimbabwe's 1-0 win against Botswana earlier in the day, and means that Algeria and Zimbabwe are through to the finals in Cameroon.
Zambia put up a strong fight in a game they needed to win in Lusaka, and the match was a thriller, with Patson Daka scoring two penalties for the home team - but Leicester City's Islam Slimani also scoring twice.
Algeria went ahead on 18 minutes thanks to Rachid Ghezzai, and their advantage was doubled when Slimani scored his first seven minutes later.
Daka got Zambia back into the match through a penalty on 33 minutes, and Zambia levelled shortly after the break when Clatous Chama notched.
Almost immediately after, Slimani scored his second to put the Fennec Foxes back ahead, but another Daka penalty on 80 minutes gave Zambia hope of getting a late winner and staying in contention after all.
And Zimbabwean hearts were in mouths as Daka netted with three minutes left - but what would have been his hat-trick goal was ruled out for offside.
Meanwhile, Equatorial Guinea also confirmed their presence in Cameroon in January next year after beating Tanzania 1-0 in Group J. Libya, who had already been eliminated, were beaten 2-5 by already-qualified Tunisia in the same group.