Kalidou Koulibaly scored the vital winning goal for Senegal as the Africa Cup of Nations holders took their hopes of adding the World Cup to their collection into the knockout stages of the competition.

The Chelsea defender skippered the side and Edouard Mendy played in goal as the Lions of Teranga recovered instantly from conceding a second-half equaliser to beat Ecuador 2-1 on Tuesday afternoon, thereby progressing from the group stage for the first time since 2002.

Senegal had taken the lead from the penalty spot late in a first half in which they had enjoyed the upper hand. There had been defending to do for Koulibaly and his colleagues but Mendy was able to enjoy a quiet time up to the midway stage of the second half.

There was little he could do to prevent the South American side levelling the scores from a set-piece but less than three minutes later, from another free-kick at the other end of the pitch, the ball was flicked on and Koulibaly expertly volleyed in at the far post for victory and his first international goal.

Going into this third group game having lost one and won one game, Senegal were in a tight three-team race for qualification, along with the Netherlands and their opponents today. With the Dutch the favourites to beat Qatar and indeed doing so by two goals to nil in the other Group A game, the African champions knew ahead of kick-off they really needed a win.

They missed a golden chance at the very start of the game, Idrissa Gueye shooting wide. Boulaye Dia dragged another effort off-target soon after.

Despite those wasteful moments, there was a positivity to Senegal’s play. Ismaila Sarr had their best attempt at goal so far midway through the first half, and it was the Watford man who both won and converted the penalty that gave his side the lead shortly before half-time.

Having been barged to the ground clumsily, he rose to take the place of usual penalty-taker Sadio Mane and planted the spot-kick into the bottom corner.

Knowing they now needed a goal, Ecuador played more in the Senegal half in the second period but it was relatively comfortable for the Africans until a free-kick was headed down and Brighton’s Moises Caicedo turned the ball in from close range.

However from a not-dissimilar position inside the Ecuador penalty area moments later, Koulibaly’s finish when a free-kick was diverted his way was even better to swing the contest back in Senegal’s favour once again.

At the end with Ecuador desperately seeking an equaliser, Mendy made an important tip-behind from a corner.

Senegal go through as a second-place side with the Netherlands winning the group but will have the experienced Gueye suspended for their last-16 game.