The Teranga Lions of Senegal have qualified for the round of 16 after battling to a 2-1 win against Ecuador in their final Group A game on Tuesday.
The reigning African champions needed to win to stand a chance of progressing into the knockout while a draw would have been enough for Ecuador.
Goals from Ismaila Sar and skipper Kalidou Koulibaly was Senegal qualify into the knockout round for the first time since 2002.
Sar gave Senegal the lead in the 44th minute from the penalty spot before Moises Caicedo equalized in the 68th minute.
But Koulibaly was the hero for his side as he netted in the 70th to send Senegal through.
Meanwhile Group A other game Netherlands defeated host Qatar 2-0 to finish leaders.
Senegal will now meet the winners in Group B in the round of 16 which will start on Saturday, 3 December.