Emmanuel Eboue and Bony Wilfried scored the goals that saw Ivory Coast go through to a quarter-final meeting with African Nations Cup hosts Equatorial Guinea after winning Group B.
The win also saw losers Angola go out of the competition as they finished with a worse goal difference than Sudan, who were 2-1 winners over Burkina Faso.
Angola might have finished one goal worse off than Sudan but the gulf between them and Ivory Coast was easily greater than the 2-0 scoreline.
Eboue gave Ivory Coast the lead when he slid in at the far post to score on the half hour and Wilfried doubled the advantage when he punished a mix-up in defence 30 minutes later.
Max Gradel had the first effort for Ivory Coast after five minutes but shot straight at goalkeeper Alegre Wilson.
Manucho was doing most of the attacking for Angola but saw Sol Bamba beat him to a loose ball as he threatened.
Wilfried then cut in from the left but Wilson turned his shot round the post, before Angola captain Andre Macanga sliced a shot badly wide during a rare attack.
On the half hour Wilfried burst into the area and hit the ball low across goal. Miguel could only hold up the ball as he tried to clear and Eboue was on hand to open the scoring.
Bamba got up well to head clear a free-kick early in the second half and then his keeper Daniel Yeboah was lucky to see his clearance rebound off the charging Manucho and go out for a goal kick.
Ivory Coast extended their lead when Abdulkader Keita played a ball behind the Angola defence and when Alex Massunguna headed it past his own keeper Wilfried ran through to tap into an empty net.
Bamba headed wide from close range when Igor Lolo headed on Gradel's corner as Ivory Coast nearly added a third.
In the other Group B Eltaib Mudather scored once in each half in the 2-0 defeat of Angola and see Sudan complete the turnaround they required to reach the knockout stages.
Sudan went into the game needing to win and hope Angola lost - with at least a three-goal swing - if they were to qualify.
But they lost Najem Abdullah to a serious injury in the early stages after a collision with Akram El Hadi as the goalkeeper dived to save at the feet of dangerman Jonathan Pitroipa. Omar Moseab took Najem's place.
Moumouni Dagano's header for Burkina Faso clipped the post and the Stallions captain then curled a free-kick over before again heading wide.
Mohamed Tahir had Sudan's first serious effort with a free-kick after he was fouled by Djakaridja Kone, but his shot was deflected wide.
But the 33rd minute brought double delight for the Falcons of Jediane as both they and the Ivory Coast took the lead almost simultaneously.
As a sliding Emmanuel Eboue netted in Malabo, Mudather ran onto Ahmed Bashir's fine first-time pass and evaded a dreadful two-footed challenge from Hamadou Tall before finishing calmly to give his side the lead at the Estadio de Bata.
Burkina Faso could have been reduced to 10 men when Mady Panandetiguiri lunged in two-footed on Alaadine Yousif, but the defender escaped with a booking.
Pitroipa missed a chance to equalise before half-time when he was played in by Dagano but finished weakly.
Burkina Faso substitute Issiaka Ouedraogo missed a glorious chance to equalise in the 56th minute, just two minutes after his introduction, poking wide when through on Akram.
Dagano then headed the lively Ouedraogo's cross just wide from outside the penalty area and Sudan's Ahmed Khalifa was off target with an overly ambitious effort.
Bony Wilfried's goal for the Ivorians swung the qualification race towards Sudan and back in Bata, an offside flag ruled out a Dagano header which would have changed the situation once more.
Muhannad Tahir tried to make the result safe with a snap-shot which was tipped over by keeper Daouda Diakite.
With 10 minutes remaining, though, Mudather did make it 2-0 via route one, racing onto Akram's long clearance and rounding Diakite to tap home.
Ouedraogo grabbed a consolation goal, heading home Pitroipa's long ball deep into stoppage time, but it was not enough to deny Sudan their qualification.