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
-
I didn’t think of making money from radio – Lexis Bill
3 minutes -
Tree Crops Authority meets Bono Regional Minister to boost cashew industry, tackle galamsey
5 minutes -
Mahama appoints Governor, Isaac Adongo and 10 others as Board members for BoG
8 minutes -
Emmanuel Agyemang-Badu joins GNPC to battle GFA
15 minutes -
VFS Global launches AI-Powered Chatbot for UK visa customers
17 minutes -
Eastern corridor road remains a priority for this gov’t – Alhassan Suhuyini
22 minutes -
Restore Local officially launches to boost locally led land restoration across Africa
30 minutes -
It’s debatable to say the previous gov’t did more road projects in Tamale – Alhassan Suhuyini
33 minutes -
Ejura Traditional Council leads efforts to strengthen synergy between community and security agencies
33 minutes -
Support content creators marketing Ghana – Culture and tourism curator
34 minutes -
‘Only one bodyguard, no extravagance’ – Former AG demands retraction from Dafemekpor over false claims
45 minutes -
UG Corporate Football League opens with four goals
47 minutes -
Workmen’s Compensation Law in Ghana and the role of insurance companies under new Insurance Act
48 minutes -
E Vibes: Becky to host Afro Harmony band
51 minutes -
Republic Bank Ghana announces the appointment of new Board Chairman
51 minutes