Mohammed Salah’s free-kick in the 10th minute handed Egypt a 1-0 win over Ghana to finish top of Group D.
Both sides progressed to the quarter finals.
In the other final group match, Uganda picked their only point from their first African Cup of Nations appearance in 39 years after a 1-1 draw with Mali in a rain drenched Stade Oyem.
Egypt, who are returning to the tournament for the first time since winning it thrice in a row in 2006, 2008 and 2010 have set up a North African derby in Sunday’s quarters in Port Gentil against Morocco, led by 2015 AFCON winner Herve Renard.
Ghana who finished second in the group will travel to Oyem to face Group C winners DR Congo in another tough match. The match could be switched to another venue.
The Black Stars who lost to the Pharaohs late last year in a 2018 World Cup qualifier in Alexandria came in hoping for revenge. However, they were put out by a tactically organized and disciplined Egyptian side which managed the game in superb fashion.
They found themselves trailing after 10 minutes, AS Roma forward Salah striking a belter of a free-kick. Salah had stolen the ball off Jonathan Mensah who had slacked in clearing. He fed it to Marwan Fahmy who was brought down at the edge of the box and the left footed maestro took responsibility and made no mistake.
Egypt came close
Egypt came close to a second after keeper Razak Brimah’s clearance fell on Fahmy’s feet, but the forward’s effort to lob into an empty net ended in the ball going over the bar.
Ghana’s day was made worse with skipper Asamoah Gyan limping out after half an hour with a suspected groin injury in his 99th cap for Ghana. He was replaced by Jordan Ayew and his face while limping off the pitch told of pain and probably, his tournament might be over.
In the second half, the Ghanaians upped the ante in search of an equalizer and a possible winner. Essam El Hadary, the oldest ever player in an AFCON match at 44 years was kept busy between the sticks for Egypt. He did well to push away a long range effort from Agyemang Badu.
The Al Ahly shot stopper once again did well, defying the agility of a man his age to fly well to his right to parry away a well struck shot from Jordan Ayew.
In the simultaneous kick off in Oyem between Uganda and Mali, a disastrous pitch turned into a water puddle by the evening rains made it a match void of quality.
Teams trying to pass the ball were left to agonizingly watch as the ball less often than not failed to reach the target owing to puddles of water on the pitch.
But in the second half, the two sides each went for goals and the showers came in with both goals in the match scored within a space of three minutes.
Standard Liege forward Faruku Miya gave the Cranes their first 2017 AFCON goal with a well taken shot from range on 71 minutes. This came just after a 69th minute goal was ruled offside.
Almost immediately, Mali went back on level terms with youngster Yves Bissouma’s well struck free kick from range which left Uganda keeper Robert Odongkara rooted to his spot.
The tournament will now go on a two day break before the quarter finals begin on Saturday.
Quarter finals pairing:
Saturday: Burkina Faso v Tunisia – Libreville (7 p.m.), Senegal v Cameroon – Franceville (10 p.m.)
Sunday: DR Congo v Ghana – Oyem (7 p.m.), Egypt v Morocco – Port Gentil (10 p.m.)