Wilfried Zaha scored as Ivory Coast qualified for the last 16 at the African Cup of Nations with a 4-1 victory over Namibia.
Namibia's Peter Shalulile failed to take the two best chances of the opening half-hour, while Max Gradel sliced wide at the other end.
Goalkeeper Loydt Kazapua almost gifted the Elephants an opener when he fumbled a cross straight to Wilfried Bony, but blocked the former Swansea striker's shot with his body outside the box before gathering his follow-up effort.
But Gradel fired the Elephants in front six minutes before half-time when he was ruled marginally onside as he ran onto Franck Kessie's superb lofted through-ball and fired across Kazapua.
it was 2-0 just before the hour when Serey Die let fly from 35 yards and a deflection off defender Ryan Nyambe left the keeper helpless.
Wilfried Zaha, who had twice been denied clear penalties, sent a weak effort straight at Kazapua and Namibia cut the deficit when goalkeeper Sylvain Gbohouo cleared the ball straight to Joslin Kamatuka, who shimmied past Serge Kanon before finishing.
But Zaha - who was the subject of a £40m bid from Arsenal, according to Sky Sports News - and substitute Maxwel Cornet scored in the final 10 minutes to make victory safe for Ibrahim Kamara's side, who finish second.
Morocco seal top spot in Group D
Mbark Boussoufa struck as Morocco clinched top spot in Group D at the African Cup of Nations with a late 1-0 win over South Africa.
The Al-Shabab forward won it in stoppage time at the Al-Salam Stadium in Cairo.
Achraf Hakimi hit the crossbar for Morocco while Youssef En-Nesyri also missed a fine chance before Boussoufa pounced, which left South Africa's hopes of qualifying from the group in the balance.
Mane at the double for Senegal
Liverpool's Sadio Mane scored twice after missing a penalty as Senegal reached the last 16 at the Africans Cup of Nations with a 3-0 win over Kenya.
The forward bagged a late brace to make up for seeing Patrick Matasi save his first-half spot-kick in Cairo on Monday.
Ismaila Sarr opened the scoring in the second half while Philemon Otieno was dismissed for Kenya after conceding Senegal's second penalty - which Mane converted.
Senegal finish second in Group C, behind Algeria.
Algeria stay perfect
Adam Ounas and Islam Slimani inspired Algeria to a comfortable 3-0 win over Tanzania as they completed a 100 per cent Group C record in the Africa Cup of Nations.
Leicester forward Slimani, who spent last season on loan at Fenerbahce, gave his side a 35th-minute lead when he took advantage of some woeful defending to latch on to a hopeful long pass from Ounas and stroke the ball past goalkeeper Metacha Mnata.
Ounas quickly slotted the second after a neat one-two with Slimani, and the pair linked up again for the third in first-half stoppage time as Ounas accelerated away from the defence, rounded Mnata and finished.
Algeria's Mohamed Fares went closest in a largely quiet second half with an effort against a post and Baghdad Bounedjah fired just wide.
John Bocco and Adi Yussuf missed late chances for a Tanzania consolation as their side finished bottom of the group without a point.