An injured Mo Salah watched from the stands as Egypt secured a point against the Group B winners to finish second in their group – with both sides scoring a goal in stoppage time.
A point would not have been enough without the late capitulation of Ghana, who conceded two stoppage-time goals to throw away a 2-0 lead against lowly Mozambique and only finish third in the group.
The results mean Egypt scrape into the last 16 with three points while Ghana are effectively out, having finished third in the group with two points.
Though Ghana could still qualify as one of the best four third-placed teams, their chances of doing so are devastatingly slender.
Salah – who has been slammed by the Egyptian public and their most-capped player ahead of returning to Liverpool for injury rehab – will be relieved that his country were spared their blushes.