Mohamed Salah scores winning penalty as Egypt see off Ivory Coast in Africa Cup of Nations shootout
The Liverpool striker converted the Pharaohs' fifth spot-kick after substitute goalkeeper Gabaski had kept out Eric Bailly's casual effort to secure a 5-4 victory and a last eight showdown with Morocco.
Egypt were first to threaten when striker Omar Marmoush rattled the bar with a curling 17th-minute effort, and Ivory Coast keeper Badra Sangare had to tip over Salah's dipping attempt.
However, the Elephants responded as the half-time whistle approached when Ibrahim Sangare forced Mohamed El Shenawy into a 39th-minute stop with an acrobatic volley before the keeper repelled Sebastien Haller's strike from distance in stoppage time.
Early in the second half, Egypt's Amr El Soleya fired wastefully over from Salah's square ball and Mohamed Elneny saw his deflected cross scrambled away by Badra Sangare.
Egypt keeper El Shenawy had to tip over Haller's 70th-minute header after Bailly had turned the ball back across goal and, after Trezeguet had come off the bench to fire wide from a tight angle at the other end, saved with his legs from substitute Wilfried Zaha as the 90 minutes ended goalless.
Egypt's Mohamed Sherif, who had been introduced at the start of extra-time, was left bloodied after heading just over within three minutes of his arrival, and Badra Sangare parried Zizo's raking 98th-minute strike.
Gabaski, who had replaced the injured El Shenawy with two minutes of normal time remaining, had to claw Ibrahim Sangare's 104th-minute shot out of his top corner, but the sides remained locked together and penalties were required.