After Equatorial Guinea comprehensively defeated the Elephants in a major upset in Abidjan, the host nation, Ivory Coast, will need to rely on other outcomes to escape a shocking group-stage departure from the Africa Cup of Nations.
Pablo Ganet's 25-yard free kick, Emilio Nsue's double, and Yannick Buyla's late goal handed the National Thunder a historic victory that guaranteed them first place in Group A.
The hosts, who placed third in the group, will have to work hard to qualify.
The top four teams from each of the six groups advance to the round of 16.
The Ivorians were just a goal behind when Ibrahim Sangare twice had equalizers disallowed, but the Elephants squandered numerous opportunities and were punished by their skilled opponent.
Following one of the biggest surprises in Afcon history, several Ivorian players broke down in tears as the final whistle blew as they were vociferously jeered off by a partisan and incensed audience at Alassane Ouattara Stadium.
In the meantime, the Equatorial Guinea team was ecstatic to record yet another thrilling victory in the finals. They will take on the third-placed team from Group C, D, or E on Sunday in the round of 16.
Their best result at an Afcon was making it to the semifinals while serving as hosts in 2015, but in an unexpected turn of events, they defeated two-time winners and three-time champion Nigeria.
Ivory Coast's chances of making it to the knockout stages with just three points and a goal differential of -3 will have to wait until the other groups are finished on Wednesday.
