The Manchester City midfielder, Riyad Mahrez scored a sensational free-kick in the 95th minute as Algeria beat Nigeria 2-1 to seal their place in the Africa Cup of Nations final.
Algeria led thanks to William Troost-Ekong’s own goal but Nigeria hit back through Odion Ighalo’s penalty, awarded following a VAR check.
Extra time was looming until Algeria, who have not been to the final since winning the tournament on home soil in 1990, won a free-kick on the edge of the box.
And the 28-year-old Mahrez, star man for the Desert Foxes, bent the ball around the wall to beat Nigeria goalkeeper Daniel Akpeyi and seal his country a place against Senegal in Friday’s final.
Meanwhile, a bizarre own goal in extra time handed Senegal a 1-0 victory over Tunisia in the drama-filled first of Sunday’s Africa Cup of Nations semi-finals, securing them a place against either Algeria or Nigeria in Friday’s decider.
A terrible mistake by goalkeeper Moez Hassen in the 100th minute saw the ball bounce off the head of defender Dylan Bronn and into the net for the only goal of a game in which both teams had second-half penalties saved.
Hassen came flying off his goal-line to try to cut off a free-kick from the right flank but completely missed the ball which then hit the unfortunate Bronn on the head.
Both teams had a chance to settle the result in the second half at the 30 June Stadium but squandered spot kicks.
Tunisia will feel aggrieved after the referee Bamlak Tessema changed a decision to award them another penalty after consulting VAR with seven minutes left of extra time.
The Senegal captain Cheikhou Kouyaté headed clear a free-kick on to the arm of his teammate Idrissa Gana Gueye in the Senegal box but, after consulting VAR, the referee decided Gueye’s arm was not moving and changed his mind.
The first half was dominated by Senegal, with Youssouf Sabaly hitting the post and Sadio Mané rounding Hassen but stumbling as he tried to convert from a difficult angle and missing the target.
After the break there were two good chances for Tunisia centre forward Taha Yasine Khennissi as he broke free of the centre backs and got on to the end of balls through the middle. The first he hit over and a heavy first touch on the second allowed Senegal goalkeeper Alfred Gomis to come off his line and smother the ball.
In the 73rd minute a stinging effort from Ferjani Sassi was blocked by Senegal centre back Kalidou Koulibaly, turning his back as he slid into the path of the shot which struck him on his elbow.
The referee awarded a controversial penalty and also booked the Napoli centre back, who is now suspended for the final. But Sassi hesitated as he stepped up to take the kick and hit a tame effort right into Gomis’s hands, throwing away a golden chance with 15 minutes left to play.
Three minutes later Ismaila Sarr was tripped in the Tunisia penalty area by Yassine Meriah.
After Mané had missed two earlier in the tournament, Henri Saivet took over penalty duties, hammering a strong shot to the corner only to be denied by a left-handed save from Hassen.
Senegal are seeking their first Cup of Nations title, 17 years after their only previous appearance in the final.