In a bizarre story, the Ivory Coast sacked manager Jean-Louis Gasset at 5pm UK time despite his side still being in the compteition.
The hosts won their opener, but lost their two following matches, the latter of which saw them hammered 4-0 by Equatorial Guinea.
That loss was the country's heaviest defeat on home soil, and meant their qualification fate was out of their hands, resulting in the Ivorian Football Federation announcing the dismissal despite them not being eliminated.
They required numerous results to go their way over the final eight group games, and they did, with the final one being Zambia's loss to Morocco.
Had the Zambians drawn that game, Ivory Coast would have been eliminated. That match was played at 8pm UK time, three hours after the managerial sacking was announced.
The hosts now have the tough task of facing reigning champions Senegal in the last 16, with the 2021 champs winning all three group games, with Gasset's assistant Emerse Fae taking over on an interim basis.
Gasset was the fifth manager to leave their post due to AFCON, with Ghana dismissing Chris Hughton and Algeria and Gambia making changes. The other was Tanzania boss Adel Amrouche, who was sacked after just one group game.
We are committed in our support of safer gambling. Recommended bets are advised to over-18s and we strongly encourage readers to wager only what they can afford to lose.
If you are concerned about your gambling, please call the National Gambling Helpline / GamCare on 0808 8020 133.