YAOUNDE: 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.
The other quarter-final saw Senegal beat Equatorial Guinea 3-1.
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.
Senegal through
Senegal overcame Equatorial Guinea to set up an Africa Cup of Nations semi-final against Burkina Faso.
Ex-Bristol City forward Famara Diedhiou put Senegal ahead with a first-time strike following Sadio Mane’s pass.
Equatorial Guinea were awarded a penalty before the decision was overturned, but then equalised soon after through Jannick Buyla’s low shot.
But substitute Cheikhou Kouyate volleyed Senegal ahead, with Watford’s Ismaila Sarr side-footing a late third.
Senegal, who never have won the tournament, face Burkina Faso on Wednesday, before Egypt play Cameroon in the second semi-final on Thursday, with the final taking place on Sunday, 6 February.
Equatorial Guinea, 114th in Fifa’s world rankings, had been hoping to cause an upset against a Senegal side ranked 20th – the highest-placed African nation.
Senegal started well as Idrissa Gueye fired a free-kick wide and Diedhiou had a shot saved by Jesus Owono before their 28th-minute opener.
Liverpool forward Mane, taken to hospital with concussion after suffering a clash of heads in the last-16 match against Cape Verde, played an excellent pass and Diedhiou finished well.
But Equatorial Guinea, semi-finalists in 2015, fought back early in the second half.
They thought they had a penalty when referee Victor Gomes pointed to the spot after the ball hit Kalidou Koulibaly’s hand at close range. But, following a VAR intervention, Gomes watched the incident on a pitchside monitor and judged Koulibaly could not have moved away in time as it was so close.
Equatorial Guinea bounced back from that disappointment and equalised in the 57th minute as Pablo Ganet linked up with Buyla, who fired an angled strike past Chelsea goalkeeper Edouard Mendy.
But Senegal were gifted a 68th-minute second when Crystal Palace midfielder Kouyate, brought on just three minutes earlier, volleyed into the net after two Equatorial Guinea defenders collided into each other while trying to head clear.
Another substitute Sarr, playing his first game since November after injury, sealed Senegal’s victory after good work from team-mate Saliou Ciss.