Zambia reached the quarter-finals of the African Cup of Nations after claiming a 2-1 win over Gabon - who crash out.
Gabon unfortunate to miss out on the last eight after tight finish
Zambia reached the quarter-finals of the African Cup of Nations after claiming a 2-1 win over Gabon - who crash out.
Goals from Rainford Kalaba and James Chamanga earned Herve Renard's side a deserved win, with Fabrice Do Marcolino's late consolation failing to halt their progress.
Zambia head into the last eight as the winners of Group D, with Cameroon finishing as runners-up, while Gabon slip out of the competition despite finishing on the same points tally as both of the sides above them.
Zambia will, however, be hindered in the next round as they saw Kabala and Kampamba Chintu pick up bookings which will rule them out of the quarter-finals.
Gabon goalkeeper Didier Ovono, impressive earlier in the group, made an unconvincing early save from Felix Katongo's long-range drive and an even better chance followed as Chamanga laid off Katongo's low cross to Jacob Mulenga.
The forward had scored in both the draw with Tunisia and the defeat to Cameroon, but blazed into the side-netting on this occasion.
Hacked
Daniel Cousin's mis-hit had to be hacked clear by Stophira Sunzu after a rare moment of panic for the Chipolopolo - the Copper Bullets - defence, but they were soon back on the attack and should have taken the lead.
A superb passing move between Mulenga, Christopher Katongo and Kalaba set up Felix Katongo, but he mis-kicked the ball dismally wide.
Kalaba failed to make contact after Felix Katongo cleverly rolled a free-kick to his feet, but he made amends after 28 minutes.
Running onto a delightful through-ball from Felix Katongo, he clipped the ball neatly beyond Ovono to score.
Gabon sought a response, and only Chintu's fine interception prevented Cousin's through-ball reaching Roguy Meye.
But it was Zambia who went close to a second as Katongo's free-kick was headed millimetres wide of goal by Sunzu.
Deflection
Kalaba fired a free-kick over the bar early in the second half but Zambia soon hit the target once more.
Chamanga tapped home their second in the 62nd minute following an excellent turn and low cross from Mulenga.
Ovono saved well as Mulenga was put in behind the offside trap but finished weakly, and Do Marcolino then halved the deficit.
The striker, who had only been on the pitch five minutes, was picked out in space inside the box and, though his clumsy control almost saw the chance escape, he found the net via an enormous deflection off Emmanuel Mbola.
Relentless Gabonese pressure followed in the final seven minutes, but Do Marcolino smashed a free-kick into the wall and Pierre Aubameyang saw another deflected over as Zambia hung on through four agonising minutes of stoppage time.
Cameroon's 2-2 draw with Tunisia in Lubango left the Indomitable Lions, Zambia and Gabon level on points, head-to-head record and goal difference but the Black Panthers missed out on goals scored.