Algeria reached the semi-finals of the Africa Cup of Nations by beating Ivory Coast 4-3 on penalties following a 1-1 draw after extra time.
Algeria took the lead through ex-West Ham winger Sofiane Feghouli’s side-foot finish before they missed a penalty.
Baghdad Bounedjah, who had been fouled by keeper Sylvain Gbohouo, hit the bar.
Ivory Coast forced extra time after Aston Villa forward Jonathan Kodjia’s low finish but, after no further goals, the tie was decided by penalties.
Algeria, seeking a first Afcon triumph since 1990, will now meet Nigeria in Cairo on Sunday (20:00 BST).
Ivory Coast had gone close to scoring when the game was goalless, Rais M’Bolhi pushing Max Gradel’s attempt on to the post.
Crystal Palace forward Wilfried Zaha went into the quarter-final looking to increase his two-goal tally at the tournament.
However, the Ivory Coast player was booked and fortunate to escape a red card after a confrontation with Ramy Bensebaini.
Zaha and Algeria’s Riyad Mahrez had been replaced by the end of the 120 minutes and did not take part in the penalty shootout.
Former Manchester City player Wilfried Bony had already had a penalty saved when team-mate Serey Die hit the post, earning Algeria victory.
Mohamed Qoutb of BBC Arabic
Ivory Coast started the game well as their wingers took advantage of the inexperience of the Algerian full-backs, unluckily for the Elephants their striker Jonathan Kodjia failed to convert a couple of chances, while Algerian goalkeeper Rais M’Bolhi forced Gradel’s effort to hit the post.
Algeria’s Feghouli was clinical in finishing the first half that made Algeria more in control of the game while Wilfried Zaha and co looked more nervous as time passed.
Both sides fought well in the midfield in extra time but it was all up to penalties to decide a game that was so tense.