Egypt will go head-to-head with Burkina Faso for a place in the final of the African Nations Cup after overcoming Morocco 1-0 in a tense quarterfinal in Gabon.
The two teams were evenly matched in a first half of few real chances, with both sides only managing one shot apiece on target.
The first opportunity fell to Egypt on 15 minutes when Ahmed Elmohamady's cross was met by Mahmoud "Trezeguet" Hassan but the midfielder's shot was straight at the keeper.
Morocco carved open their first attempt on goal when a free kick on 24 minutes found the head of Manuel Da Costa but the Olympiakos defender was thwarted by a diving Essam El-Hadary gathering the ball to his right.
The interval seemed to rejuvenate the Egyptians who came out firing and forced a smart save from Moroccan goalkeeper Munir, who stopped a right-footed strike from forward Abdallah El Said.
Morocco began to carve out chances of their own and came close to opening the scoring with 15 minutes left when striker Aziz Bouhaddouz saw his header saved on the line following a superb cross by Hamza Mendyl.
Two minutes later, Roma star Mohamed Salah went close at the other end but fired his shot straight at the keeper.
However, it was Egypt who eventually broke the deadlock three minutes from full-time when a corner whipped in from the left was poked home by midfielder Mahmoud Kahraba following a scramble in the six-yard box.
The result means a semifinal tie on Wednesday night where the Pharaohs will start as favourites to reach Sunday's final.