Zambia and Senegal qualified for the semi-finals of the African Nations Championship as Group A concluded on Saturday.
Senegal drew 0-0 with hosts Ivory Coast, while a last-gasp strike from Dennis Banda earned Zambia a 1-1 draw with Tanzania.
Tanzania took the lead in the 88th minute with a penalty from Shadrack Nsajigwa, and the Taifa Stars seemed to be heading into the last four of the first major competition that they have played in since 1980.
But Banda latched onto a corner kick and scored with a spectacular overhead shot in the fourth minute of stoppage time to put the Chipolopolo through.
A crowd of only 2,000 at the Felix Houphouet Boigny Stadium in Abidjan watched Ivory Coast earn their sole point of the competition.
It was a slightly better performance from Ivory Coast, who lost their first two games, but they still failed to score at the tournament.
Zambia finished top of the group on goal difference, ahead of Senegal.
Group B concludes on Sunday, with all four teams in with a chance of reaching the semi-finals as DR Congo play Ghana and Zimbabwe take on Libya.