Egypt snatched top spot in Group D of the Africa Cup of Nations on Thursday (AEDT) thanks to a 1-0 win over Ghana, which could be without star striker Asamoah Gyan in the quarter-finals.
Mohamed Salah's blistering early free-kick was the only goal of the game at Stade de Port-Gentil in Gabon, and Egypt, having qualified for the knockout stages in top spot, will be back at the same venue on Monday (AEDT) for a last-eight showdown with Morocco.
Ghana had already secured its progression and led the group going into the final round of matches, but must settle for second after coming up short against Hector Cuper's team, with DR Congo now awaiting in the Oyem this weekend.
Ghana boss Avram Grant will also have been concerned at the sight of Gyan limping off late in the first half with what appeared to be a groin injury, leaving the captain just four days to recover for the next match.
Salah opened the scoring in style for Egypt in the 11th minute. Abdallah El Said won a free-kick when he was felled by John Boye on edge of the area and Roma star Salah found a gaping hole in the wall to fire a fierce strike into the top corner of the net, leaving goalkeeper Razak Brimah helpless.
Egypt was seemingly happy to defend deep after taking the lead and Ghana struggled to respond, Christian Atsu heading a rare chance off target and Andre Ayew's poor first touch wasting an opportunity on the counter after he was found in space by Gyan.
Ghana's hopes of drawing level suffered a blow late in the first half, when Gyan pulled up and, despite initially attempting to continue, had to be replaced with Jordan Ayew in the 41st minute.
The injury to the star striker might have unsettled the Black Stars, who almost went 2-0 down when Razak inexplicably played a clearance straight to Marwan Mohsen, who guided an attempted lob just over the unguarded net.
At the other end, Daniel Amartey crashed a header narrowly high and wide after arriving unmarked at the back post to meet Atsu's free-kick.
Ghana continued to press in search of an equaliser after the break, Boye heading unconvincingly over and Atsu driving threateningly at goal before losing control of the ball.
The Ayew brothers combined to create a shot that was blocked by Egypt's determined backline, before Emmanuel Badu stung the experienced palms of Essam El-Hadary with a dipping strike from long range.
Jordan Ayew tested El-Hadary again after a great run as injury time approached, but it was ultimately a night of frustration, and concern, for Ghana, with the fitness of Gyan likely to dominate the agenda as it prepares to tackle the Leopards.