Kalidou Koulibaly sent Senegal into the World Cup knockouts for just the second time in their history with the winner in Tuesday's dramatic 2-1 win over Ecuador.
The Netherlands' dominant victory over Qatar meant only a win would see African champions Senegal through to the knockouts from Group A, while Ecuador would have progressed with a draw.
Senegal opened the scoring through Ismaila Sarr's penalty late in the first half, but despite managing to keep Ecuador captain Enner Valencia quiet throughout, Moises Caicedo levelled in the 67th minute before Koulibaly sent his team through and Ecuador home with his first international goal.
"Four days ago we were up against a brick wall. We knew this was a win or lose situation," said Senegal coach Aliou Cisse.
Man-of-the-match Koulibaly said that Senegal "need to show why we are champions of Africa" when they face the winner of Group B on Sunday.
"We need to rest up, keep a cool head, yes we've qualified and yes we can savour the win, but now we need to concentrate," said the Chelsea defender.
Ecuador manager Gustavo Alfaro lamented his team's poor first half performance, saying "we weren't ourselves".
"At half-time I told them if you want to stay in the World Cup, you have to play," he said.
"Today we were knocked out of a beautiful dream that these guys were weaving over the past few years."
Cisse promised before the game his experienced side "would not overthink" the occasion and it was the Lions of Teranga who opened the game furiously, with Everton's Idrissa Gana Gueye lashing the ball just wide of an open goal after only three minutes.
Less than a minute later, Ecuador goalkeeper Hernan Galindez needed to bail out his side's high backline, sliding in to stifle a counter well outside his box.
On the 10 minute mark, Senegal's Boulaye Dia found himself one-on-one with Galindez, but he cut the ball just wide of the post.
Seemingly sparked into life by Senegal's fierce opening, Ecuador pushed forward and won a free-kick 30 metres from goal, with the South Americans taking the opportunity for a rare breather before Valencia slammed the ball into the wall.
After the furious opening exchanges, both sides began to settle and the first half looked set to end goalless before Ecuador defender Piero Hincapie clattered into Sarr, giving referee Clement Turpin no choice but to point to the spot.
Sarr stepped up and coolly dispatched a fine spot-kick past Galindez, maintaining eye contact with the keeper as the ball went in.
Ecuador started the second half fresher and more determined, perhaps reassured that the Netherlands' dominance over Qatar meant they only needed a draw to go through.
From a free-kick, defender Felix Torres rose high to head the ball on to Caicedo, who was waiting at the far post and slammed the ball home.
Senegal struck back immediately and in almost identical fashion, with Koulibaly lurking unmarked at the far post following a free-kick which was deflected into his path by Hincapie and dedicating his matching-winning display to deceased Senegal icon Papa Bouba Diop.