Egypt came from a goal down to beat Morocco 2-1 in extra time in an Africa Cup of Nations quarterfinal clash played on Sunday and book a place in the semifinals.
Sofiane Boufal scored first after just seven minutes, but Mohamed Salah equalised at the start of the second half before Trezeguet completed the comeback in extra time.
Morocco got off to a perfect start as they took a seventh-minute lead through Boufal from the spot after Achraf Hakimi was brought down in the box.
The referee initially waved away appeals from all players, but a VAR check awarded the Moroccans the chance to take the lead, which Boufal easily took.
There were few clear chances in the remaining part of the half, as Morocco managed to keep Salah and company quiet.
Egypt came back for the second half with renewed vigour, and almost equalised four minutes in when Trezeguet made a yard for himself inside the box after an accurate pass and took a shot that went just wide of the left post.
They finally got their goal in the 54th minute when Salah tapped home from close range after a rebound fell kindly into his path.
Nayef Aguerd came within inches finds himself some space around the penalty spot to connect with a fine free-kick. His header is slightly mistimed and sails inches over the bar.
A scuffle ensued in the 75th minute when Hakimi angrily reacted to a Mostafa Mohamed foul, leading to three yellow cards.
Gabaski was then forced into a world-class save when Aguerd connected with a cross deep inside the box to send a nice header directed to the middle of the target, with the keeper punching it onto the post.
With no winner in a tight contest, the match was forced to go into extra time.
Trezeguet then tapped in a Salah cross from close-range to give the Pharaohs the lead just before the break.
It proved the winner as Egypt booked a semi-final date with hosts Cameroon, who beat giant-killers Gambia 2-0 in the first quarter-final match.