Hosts of Africa Cup of Nations (AFCON), Cote d’Ivoire have survived the group stages despite losing two games and winning one.
The hosts had started well in the competition, sealing a 2-0 win over Guinea-Bissau in the opening game but went on to fall 1-0 to Nigeria and 4-0 to Equatorial Guinea in Group A.
Their final game was a humiliation which saw fans leaving the stadium before the final whistle, and it led to the sack of their coach Jean-Louis Gasset on Wednesday.
Zambia needed a point from the game to deny the Cote d’Ivoire the fourth and final round of 16 qualification spot as the best third-placed teams.
But Hakim Ziyech slammed in from close range in the 37th minute to send Zambia home, while Ivory Coast go through.
Cote d’Ivoire who are now without a coach will take on the defending champions, the Terenga Lions of Senegal in the round of 16 on Monday.
The Atlas Lions of Morocco will then face South Africa on Tuesday.
