Egypt needed an extra-time goal courtesy of Mahmoud 'Trezeguet' Hassan to silence Morocco in the “North African Derby” and reach the semi-finals of the Africa Cup of Nations in Cameroon on Sunday.
However, it was the Atlas Lions who took the lead in the sixth minute of the game through Sofiane Boufal before Mohamed Salah levelled matters for the Pharaohs in the 53rd minute at Ahmadou Ahidjo Stadium.
However, Trezeguet, who had come on for the injured Ahmed Hegazy, struck home the winner in the 100th minute after being set up by Salah.
It was the Atlas Lions who started the game on a high note and they should have put the ball into the back of the net with only a minute played when Munir El-Haddadi put through Boufal on goal but before he could pull the trigger, he was adjudged offside.
However, five minutes later, Egypt conceded a penalty after Ayman Ashraf fouled the advancing Achraf Hakimi inside the box and after the referee reviewed the incident using the assistance of VAR, the penalty was allowed to stand.
It was Boufal, who plays for Ligue 1 club Angers, who stepped up to calmly send Egypt goalkeeper Mohamed Abou Gabal the wrong way as his right-footed effort went into the top right corner.
The Atlas Lions continued to attack their North African rivals and in the 11th minute, they almost doubled their lead when El-Haddadi’s left-footed shot from the left side of the box was blocked after a clever pass from Boufal.
In the 16th minute, Egypt’s Salah won a free kick in the attacking half but Omar Marmoush’s delivery was dealt with by goalkeeper Yassine Bounou.
In the 25th minute, Egypt defender Omar Kamal was the first player to be shown a yellow card by Senegalese referee Maguette N’Diaye after a clumsy challenge on Adam Masina and four minutes later, Hakimi almost scored from a direct free-kick but his effort went inches wide.
In the 34th minute, Morocco’s Selim Amallah was also cautioned for a bad foul and from the resultant free-kick, Sofyan Amrabat’s right-footed effort could not trouble keeper Abou Gabal.
Egypt coach Carlos Queiroz made a half-time substitution as Trezeguet came on for the injured Hegazy and three minutes later, the Aston Villa player almost levelled the scores for the Pharaohs but his effort after making a yard for himself inside the box went off the left post.
Egypt looked livelier in the second half as Ahmed El Fotouh hit the woodwork in the 50th minute and seconds later, Marmoush also saw his effort whizz over the bar. But in the 53rd minute, Salah levelled the scores for the Pharaohs.
An in-swinging corner whipped into the box saw a great save from Bounou after the initial header but the rebound fell straight to Salah a few yards out, and he rifled home a left-footed effort from close range into the bottom right corner for his second goal of the tournament.
It was all Egypt then and Salah almost made it 2-1 straight from the restart - after receiving a good pass just outside the box, he unleashed a strike from a promising position, but the shot was blocked by defender Nayef Aguerd and went out a fruitless corner.
In the 66th minute, Morocco made their first change, Soufiane Rahimi coming on for Boufal and almost immediately they nearly regained the lead after Amrabat set up Youssef En Nesyri, but the latter’s weak effort was well gathered by keeper Bounou.
With 12 minutes left to the final whistle, the game turned nasty as the referee flashed three yellow cards in a space of seconds, the first to Morocco’s Hakimi and then Egypt’s duo of Mostafa Mohamed and Ayman Ashraf.
Egypt then rested Marmoush for Zizo, but it was the Atlas Lions who came close yet again as Nayef Aguerd’s header after a cross from Selim Amallah was saved in the top centre of the goal by keeper Abou Gabal.
The referee blew the final whistle for full-time and with extra-time kicking off, Egypt suffered a blow when Gabaski was injured, forcing Queiroz to replace him with Mohamed Sobhi.
In extra-time, it was Trezeguet who won the game for Egypt after he steered the ball into the net following a cross from Salah to hand the Pharaohs the bragging rights in the derby and also a semi-final spot, where they will now face hosts Cameroon.