Egypt advanced to the last eight of the Cup of Nations on Wednesday after beating Cote d’Ivoire in a penalty shoot-out.
The Egyptians entered the tie at the Stade Japoma in Douala as underdogs following lacklustre victories over Guinea Bissau and Sudan in the group stages.
Cote d’Ivoire had destroyed defending champions Algeria 3-1 in their final game in Group E.
But after a cagey opening, Egypt took control of possession. Skipper Mohamed Salah pulled the strings from midfield drawing defenders to set up teammates in better positions.
However, his munificence failed to bring rewards.
After the pause, Egypt maintained their ascendance but the Ivorians started to offer a threat and finished the game more powerfully.
Five minutes from time, substitute Wilfred Zaha let fly from the left but the Egypt goalkeeper Mohamed El Shenawi beat away the effort.
Substitution
That was his last contribution to the game. The 33-year-old left the field having injured his right leg during his heroics.
Gabaski replaced him with two minutes remaining and saw out the dying embers of regulation time.
Towards the end of the first-half of extra time, Gabaski earned his corn. He flew to his left to push away Ibrahim Sangare's curler from 25 metres to keep the score at 0-0.
His adroitness on his right proved the difference during the penalty shoot-out as he managed to nudge Eric Bailly's shot onto the crossbar and away to safety.
A couple of minutes later, Salah drove the ball assuredly to the right of the Ivorian goalkeeper Badra Ali Sangare to launch the Egyptian celebrations.
"Penalties are a lottery," said the Egypt boss Carlos Queiroz. "But I think the best team on the pitch was rewarded with the penalties at the end. It was our day."
Morocco await the Egyptians on Sunday at the Stade Ahmadou Ahidjo instead of the Olembé Stadium which has been excluded from the list of venues while an inquiry is conducted into the causes of the fan stampede which left eight people dead and 38 injured.