World Cup-bound Cameroon, who fell behind after a Rigobert Song blunder, moved to second in Group D on three points from two matches, one behind Gabon, who were earlier held 0-0 by Tunisia.
Tunisia have two points, one more than Zambia, who will face Gabon on Thursday in the last round of matches. Victory against Tunisia will secure the Indomitable Lions a place in the last eight, but that game could well have meant nothing had it not been for a defiant fightback.
It took only eight minutes for Zambia to take the lead thanks to the 34-year-old Song, playing in a record eighth Nations Cup finals for Cameroon.
Song, who was also at fault for the goal his side conceded to Gabon in their opener, headed a Zambian cross onto his ‘keeper, who only managed to parry the ball towards striker Jacob Mulenga, who tapped the ball home.
Zambia held on until the 68th minute when ‘keeper Kennedy Mweene failed to control a seemingly harmless cross that went under his belly before crossing the line.
Inter Milan striker Samuel Eto'o then recaptured his scoring instinct with perfect timing to put Cameroon ahead. Eto'o, a pale shadow of his brilliant self since the tournament started, thought he had struck the winner when he fired home a crossed shot from inside the box in the 72nd minute.
Paul Le Guen's side, however, conceded a penalty converted by Chris Katongo in the 81st minute, only for Mohamadou Idrissou, who had started on the bench, to head home with four minutes left from a Geremi cross.
The lively encounter was in sharp contrast to the rain-hit curtainraiser between Gabon and Tunisia in Lubango.
The Gabon Panthers dominated throughout but proved too clumsy to snatch their place in the quarterfinals with one game to spare. With the rain pelting down after the break, Gabon were denied a last-minute penalty when Ammar Jemel brought Daniel Cousin down in the area.