Zambia defeated African Nations Cup co-hosts Equatorial Guinea to qualify ahead of them as Group A winners, with captain Christopher Katongo's second-half strike the difference between the sides.
Equatorial Guinea were already assured of their place in the quarter-finals after winning their first two matches, but lost out on the chance of a favourable draw as they failed to get to grips with Herve Renard's side at the Estadio de Nuevo.
Zambia had the better of the chances but a stalemate looked likely until Katongo collected a throw-in on the left, dribbled the ball into the penalty area and beat Clementino Emmanuel Danilo at his near post with 67 minutes gone.
Katongo tried his luck early on with a 30-yard strike in the third minute, but it did not require Danilo to make the save.
Zambia continued to press and Davis Nkausu found Emmanuel Mayuka on the six-yard line, though he somehow headed over.
Equatorial Guinea were short of the attacking prowess they had shown in their previous matches and were stuggling to muster any serious attempts.
Zambia's next opportunity came after 35 minutes when Rainford Kalaba jinked right and left on the edge of the area before laying the ball to Katongo, who took a touch past Daniel Evuy before seeing his shot saved smartly by Danilo.
With five minutes left in the half Ivan Bolado registered the home side's first proper shot on target, but it did not worry Kennedy Mweene.
Just after the restart Zambia were lucky to win an indirect free-kick in the area. Kalaba teed up Hichani Himonde but his powerful shot was bravely charged down.
Zambia were in control but lacked finesse in the final third, with Kalaba and Stophira Sunzu shooting wastefully.
But with 23 minutes to play, Katongo produced his moment of quality, taking the ball from Joseph Musonda and driving into the danger area before finally defeating Danilo.
A response did not seem likely and, one weak 25-yard strike from Viera Ellong aside, the local fans were given little to cheer.