Record seven times champions Egypt needed a late goal to defeat Morocco 1-0 in Port-Gentil Sunday and reach the semifinals of the 2017 African Cup of Nations (AFCON 2017) tournament to mark their return to the continent’s top soccer tournament after an absence of seven years.

Substitute Mahmoud Abdel Menaem “Kahraba” scored the winner two minutes from full time to guide the Hector Cuper-coached side to yet another lone goal victory; a trademark achieved twice before by the Pharaohs in AFCON 2017.

Egypt will now face Burkina Faso next Wednesday in Libreville with a place in the final at stake.

The cagey opening half’s first chance came as early as the sixth minute, when an Egypt corner fell to Ahmed Elmohamady, but the defender’s shot went wide.

The Pharaohs best chance came after 15 minutes when Mohamed Salah sent a cross from the right side for Mahmoud Hassan, whose shot was stopped by Moroccan goalkeeper Monir El Kajoui’s legs.

Morocco had to wait until the 23rd minute to have their first glimpse of danger when Faycal Fajr’s corner was met by Ghanem Saiss, but the latter’s header went over the bar.

Saiss was once again the man behind Morocco’s danger when he saw his header kissing the top of the cross bar from Manuel da Costa’s cross after 34 minutes, as the first half ended goalless.

Morocco started the second half with more possession, but the first chance came to Egypt after four minutes when Salah rounded his marker to fire a shot that needed a timely save from El Kajoui.

Five minutes later, Nabil Dirar sent a low cross that went without a follow-up touch. It was a sign of what was to come as Morocco wasted two glorious scoring chances in the span of as many minutes.

Mubarak Bousoffa’s thuderous shot rebounded from the crossbar after 50 minutes, with Rachid Bohaddouz heading just wide seconds later in a period of Moroccan dominance.

Egypt survived another scare at the hour’s mark when Elmohamady was there just in time to clear Fajr’s shot beforr crossing the line. And Bouhaddouz was near again from giving Morocco the lead after 68 minutes when he was the first to meet Fajr’s cross but his header went wide yet again.

Once again El Kajoui was there for The Atlas Lions after 72 minutes. Abdullah El Said chipped a free kick intelligently in the path of Salah, but the Moroccan shot stopper stretched himself fully to deny him from breaking the deadlock.

Two minutes from full time, El Said’s corner fell in front of the substitute Mahmoud Abdel Meneam “Kahraba” who reacted fast to send the ball to the back of the net, and send Egypt to the semi-finals.