Mohamed Salah scored one goal and set up the other as Egypt beat Morocco in extra time in the Africa Cup of Nations quarter-finals.
Sofiane Boufal gave Morocco an early lead with a penalty after Ayman Ashraf caught Achraf Hakimi, a decision given by the video assistant referee.
But Salah tapped in an equaliser after Yassine Bounou parried a header and the game went to extra time.
Liverpool's Salah squared for Aston Villa's Trezeguet to tap in a winner.
Carlos Queiroz's side will face hosts Cameroon in Thursday's semi-final.
The seven-time champions may need to play that game with third-choice keeper Mohamed Sobhi, who came on for his international debut after Gabaski hurt himself while tipping Nayef Aguerd's header on to the bar near the end of normal time.
Without that save there would have been no semi-final to worry about - and Salah would have been on the next flight back to England.
Boufal's penalty was the only chance of note for either side in the first half - with most other efforts from long range.
Morocco were starting to dream of only their second semi-final since 1988 but Salah had other ideas, forcing extra time and then helping settle it by setting up half-time substitute Trezeguet.
Salah has been involved in 64% of Egypt's goals at the Africa Cup of Nations - nine of 14 - since he made his competition debut in 2017.
Egypt should have scored a third right at the end after Morocco keeper Bounou came up for a free-kick. Morocco played it short but Egypt made a mess of their counter-attack and Salah shot into the side-netting.
Latest Stories
-
CLOGSAG vows to resist partisan appointments in Civil, Local Government Service
58 minutes -
Peasant Farmers Association welcomes Mahama’s move to rename Agric Ministry
60 minutes -
NDC grateful to chiefs, people of Bono Region -Asiedu Nketia
1 hour -
Ban on smoking in public: FDA engages food service establishments on compliance
1 hour -
Mahama’s administration to consider opening Ghana’s Mission in Budapest
1 hour -
GEPA commits to building robust systems that empower MSMEs
1 hour -
Twifo Atti-Morkwa poultry farmers in distress due to high cost of feed
1 hour -
Central Region PURC assures residents of constant water, power supply during yuletide
1 hour -
Election victory not licence to misbehave – Police to youth
1 hour -
GPL 2024/2025: Nations thrash struggling Legon Cities
1 hour -
Electoral offences have no expiry date, accountability is inevitable – Fifi Kwetey
1 hour -
Ghanaians to enjoy reliable electricity this Christmas – ECG promises
1 hour -
Police deny reports of election-related violence in Nsawam Adoagyiri
1 hour -
‘We’re not brothers; we’ll show you where power lies’ – Dafeamekpor to Afenyo-Markin
1 hour -
EPA says lead-based paints are dangerous to health, calls for safer alternatives
3 hours