Senegal needed a win against Ecuador to get out of Group A and into the knockout stage. A draw would have sent Ecuador through and Senegal would go home. In the end, despite a second half Ecuador comeback, Senegal pulled out the 2-1 win.

In the first half, Ismaila Sarr was fouled in the box and converted the penalty kick right before halftime to put Senegal where it needed to be. Then, chaos broke out as it tends to do on the final group stage day of the World Cup.

Ecuador’s young phenom Moisés Caicedo found the equalizer in the second half and had the momentum with a little more than 20 minutes remaining. Senegal needed to push forward for the next goal without star attacking player Sadio Mané, who had to miss the tournament with an injury.

But it was another Premier League star who quickly became the hero for Senegal.

Just two minutes after Caicedo tied the match, center back Kalidou Koulibaly was in the right spot to pick up a deflection off an Ecuador defender on a set piece and beat goalkeeper Hernán Galindez for one of the more memorable goals in Senegal national team history.

It’s the first time since 2002 that Senegal reached the round of 16 and they are the first African side to be in the knockout stage since 2014.

Senegal and Ecuador both beat the odds in different ways. Senegal made it to the next stage despite losing to the Netherlands in the opening match, while Ecuador is heading home after beating Qatar in the first match and drawing the Netherlands last Friday.

Senegal will face the winner of Group B — likely to be England — and the Dutch will face the second-place finisher in Group B, which is likely to be Iran or the United States. Although Wales can be a factor for one of those spots.