Egpyt qualified for the last 16 of AFCON and rode out the tumult of one of the tournament's most dramatic group stage finales with a 2-2 draw against Cape Verde.
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.
He will have feared the worst with the Pharaohs staring at an early exit after falling behind to a goal from Gilson Tavares, while Ghana went ahead against Mozambique elsewhere.
But super sub Mahmoud Trezeguet hauled Egpyt level and Mostafa Mohamed fired them ahead at the start of stoppage time.
Cape Verde then rocked Egypt by equalising through Bryan Teixeira, but they were saved by Ghana's horror show.
Ghana, managed by former Brighton boss Chris Hughton, had taken a 2-0 lead against minnows Mozambique thanks to Jordan Ayew penalties either side of half-time.
But Mozambique pulled one back a minute into stoppage time when they were given a penalty after Ander Ayew - brother of their goalscorer - committed a handball and Geny Catamo fired his effort into the bottom corner.
Their dramatic comeback was complete four minutes into added time when Reinildo Mandava nodded the ball home from a corner to all but end Ghana's hopes of making the next round.
'AFCON is mental. What a tournament,' wrote one user on X, formerly Twitter.
'Greatest AFCON group stage ever already hands down. Best group stage of any football tournament in my lifetime,' said another.
'This, right here, is outstanding AFCON. You switch over for one game of madness and all you're doing is missing the chaos on the other channel,' quilled another.
One stunned user wrote: 'This AFCON is turning out to be one of the best ever. Goals galore, screamers, late goals, drama, zero controversies. Host team getting knocked out in the group stage [not confirmed]. It's time for Africa.'
Ghana's collapse is welcome news for Ivory Coast, who came third in their own group after a 4-0 hammering by Equatorial Guinea but have a point more than them.
Brighton and Nottingham Forest have four players with Ivory Coast between them and could have their players back early if they do not make the last 16.
wewekmopst
0
Viva nosso boy
Yaedklor
3
mis you too sala
Yekacdsz
2
now did Ghana qualify or not
Alerk
0
why players who play in Europe go and participate this tournament? I don't understand.!!!
The dumbest question ever askedπ€¦
Tunbemoy
0
am telling you
Webanopr
1
This is a more boost and an opportunity for MAN CITY.
Webanopr
2
I'M SO HAPPY THAT SALAH MUST COME BACK FROM WHERE HE IS LIVING NOW...
fowabempsz
0
why players who play in Europe go and participate this tournament? I don't understand.!!!
are you this dumb what sort of stupid question is that
Veedioptu
0
Cool Mai's
Hoocdilors
1
Namibia have a good chance to qualify as best four third place
lawalidris
0
Best four third place team with 2 points?
Febadiknoz
0
All football is a joke, you guys wrote an article earlier saying mo salah has gone back to liverpool but how come he was in the stands watching. Let no man trust all football please
Indeed.. AF is rumour spreader
CharliebrightYNWA
7
All football is a joke, you guys wrote an article earlier saying mo salah has gone back to liverpool but how come he was in the stands watching. Let no man trust all football please
Nimabceory
1
why players who play in Europe go and participate this tournament? I don't understand.!!!
zomaeikps
0
three draws and you qualify mmmm,this is luck
Femzy1991
1
M.Salsh has returned to Liverpool but the article says he was watching from the stands.Which standsππππππππππ
He was in the stadium to see the match. He traveled after the match..
Kuselmnyz
2
M.Salsh has returned to Liverpool but the article says he was watching from the stands.Which standsππππππππππ
muwabmuy
0
super tournament by Africa,it's so exciting,Africa to the world,you just can't miss a moment
hezkenny
0
Ghana didn't forget the popular "Ghana-must-go" bag at home