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
-
Fruits, Vegetables and Heart Health
32 seconds -
Newly enskinned Nungua Gamu Queen shot dead
4 minutes -
Customer Experience: The key to business growth
22 minutes -
Ghana Premier League to resume on March 7
22 minutes -
AAG announces the return of Gong Gong Festival of Creativity & Awards
40 minutes -
FDA responds to BBC documentary on illegal importation of unapproved opioids into Ghana
51 minutes -
TEWU threatens strike over withdrawal of vehicle maintenance allowance for junior staff
1 hour -
Arab Rugby Sevens Championship 2025 was a huge success – Herbert Mensah
2 hours -
Kirsty Coventry open to expanding Olympic hosting beyond traditional windows
2 hours -
IOC Presidential Candidate Kirsty Coventry welcomes South Africa’s interest in hosting the Olympics
2 hours -
IOC Presidential candidate Kirsty Coventry praises Morocco’s sporting growth
2 hours -
Mainstream PPPs to finance infrastructure gap – Oppong Nkrumah to government
2 hours -
Ayariga dismisses demands to summon Communications Minister over radio station shutdowns
2 hours -
Today’s Front pages :Wednesday, February 26, 2025
3 hours -
U.S. Ambassador pays courtesy call on Defence Minister; vows to continue strong security partnership
3 hours