Seven-time champions Egypt clinched a place in the Africa Cup of Nations last 16 on Wednesday by defeating neighbours Sudan 1-0, a result which sent Cape Verde and Malawi through as well.
Egypt make Cup of Nations last 16 as Cape Verde, Malawi advance
Mohamed Salah (C) celebrates after Egypt scored against Sudan
Nigeria finished Group D with a third successive win as they beat Guinea-Bissau 2-0, leaving Egypt to face the winners of Group E in the next round, and a potential clash with Ivory Coast in Douala.
Mohamed Abdelmonem headed home the winner at a corner 10 minutes before half-time in Yaounde to send the Pharaohs through and eliminate Sudan.
Egypt's victory guaranteed Cape Verde and Malawi will qualify as two of the four best third-placed sides. It is the first time Malawi have reached the knockout rounds of the tournament.
Three-time former winners Nigeria continued their fine start to the competition by sweeping aside Guinea-Bissau courtesy of second-half goals from Umar Sadiq and captain William Troost-Ekong.
The Super Eagles will stay in Garoua to play a third-placed team in the last 16 on Sunday.
Cape Verde will take on Sadio Mane's Senegal in Bafoussam on January 25, while Morocco await Malawi on the same day in Yaounde.