Mohamed Salah scored the decisive spot-kick as record seven-time champions Egypt beat the Ivory Coast 5-4 on penalties after a 0-0 draw in Douala on Wednesday to reach the Africa Cup of Nations quarter-finals.
The Liverpool star smashed home his penalty with the Ivory Coast's Eric Bailly the only player to fail from the spot, and Egypt go on to play Morocco in the last eight in Yaounde on Sunday.
It was a tense last-16 tie which for long spells resembled a battle of attrition on a poor pitch at the Japoma Stadium in Cameroon's economic capital, and it looked for much of the game as though Egypt would pay for their poor finishing, AFP reported.
However, Carlos Queiroz's team are now through to the last eight despite having scored just two goals in their four matches in Cameroon so far.
"Considering the number of opportunities we had I feel we deserved to win," said Queiroz, who said he is thriving under intense pressure despite criticism of the Portuguese coach in Egypt.
"It is part of the package. Professional players and coaches can't live without pressure. It is a source of inspiration."
Meanwhile two-time champions the Ivory Coast are out, once again defeated by an Egyptian side who have long held the upper hand in meetings between the continental heavyweights.
This was their 11th AFCON encounter and still Egypt have lost just once to the Elephants.
Among their many successes against the Ivory Coast was their victory on penalties in the 2006 final, and a crushing triumph in the semi-finals in 2008.
"I can't really reproach the players. It's not as though they missed every penalty. It was just decided by a little detail," said Ivorian coach Patrice Beaumelle.
This match, like those played on Tuesday, was preceded by a moment's silence in memory of the victims of Monday's tragic crush in Yaounde.
The crowd was well below what might have been expected for such a match, but many of those who were present were clearly there to see Salah, judging by the screams every time the Liverpool star's face appeared on the big screens.
Salah spoke on the eve of the tie of his desperation to win the Cup of Nations, with the last of Egypt's record seven titles coming in 2010, a year before he made his international debut.
He was the one who delivered the final blow, but only after he and his side squandered a hatful of chances.
The young VfB Stuttgart winger, Omar Marmoush, almost put Egypt ahead with a superb 17th-minute strike from 25 meters that crashed off the top of the bar.
Salah and Mostafa Mohamed were both denied by Badra Ali Sangare in the first half, while the Ivory Coast lost influential midfielder Franck Kessie to injury after just half an hour.
Still the Elephants almost went ahead when the unmarked Ibrahim Sangare saw his acrobatic effort pushed away by Mohamed El Shenawy.
Sebastien Haller, the Elephants' own Europe-based attacking superstar, struggled to get into the game before two attempts, either side of half-time, tested El Shenawy.
The experienced Al Ahly goalkeeper came off injured after a long delay late on as the game petered out, with Mohamed Abogabal replacing him for extra time.
The Zamalek shot-stopper produced a fine save to deny the excellent Sangare before Haller was taken off, and as the game went to penalties Abogabal tipped Bailly's kick onto the bar and Salah then had the last word.