Seven-time winners Egypt knocked out Morocco to reach the 2017 Africa Cup of Nations (AFCON) semi-finals in Gabon on Sunday as substitute Mahmoud Abdel-Moneim prodded home a dramatic 87th-minute winner.
Mohammed Salah had twice been denied by Munir Mohamedi, but prior to the goal Morocco missed a host of good chances.
Aziz Bouhaddouz failed to connect with a cross from two yards out, before seeing a header deflected just wide.
And Morocco defender Romain Saiss and midfielder Mbark Boussoufa were both denied by the crossbar.
Egypt go on on Wednesday to play Burkina Faso, who beat Tunisia 2-0 in their quarter-final on Saturday.
In Sunday’s other quarter-final, Ghana beat DR Congo 2-1 to set up a Thursday meeting with Cameroon, who also knocked out Senegal on Saturday.
Egypt —- the most successful side in AFCON history with seven titles —- are yet to concede a goal in Gabon on their return to the competition after a seven-year absence.
But Morocco boss Herve Renard’s bid to become the first manager to win three AFCON titles with three different countries is now over.
The Frenchman led Zambia to unlikely triumph in 2012, and won the 2015 title with Cote D’Ivoire.
On a pitch which has been criticised for its poor quality, his side created the greater number of clear opportunities to score.
But they were wasteful in front of goal and were made to pay as extra-time loomed.
From an Egypt corner kick which Morocco failed to clear, the ball dropped kindly to 22-year-old forward Abdel-Moneim, also known as Kahraba, who stabbed home the winner on the spin.