Guinea scored with the last kick of the game to end the giant-killing run of Equatorial Guinea at the Africa Cup of Nations and book themselves a slot in the quarterfinals with a 1-0 victory at Alassane Ouattara Olympic Stadium on Sunday.
Mohamed Bayo's superb glancing header in the eighth minute of stoppage time proved the difference after Equatorial Guinea, who were down to 10 men in the second half, missed a penalty.
- Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)
Guinea ended a long sequence of losing in the AFCON knockout stages but took their time, and rode their luck, to claim victory.
It came after a spell of probing football at the end of the game and from an accurate cross on the right from full back Ibrahim Diakité that Bayo expertly flicked into the net, in a small gap between the near post and the goalkeeper.
Guinea had brought on the Bundesliga-based pair of Naby Keita and Serhou Guirassy to inject urgency into their attack and they slowly took command in the closing stages, setting up several chances.
Guinea had a man advantage from the 55th minute when Equatorial Guinea's influential holding midfielder Federico Bikoro was sent off for a high-foot tackle on Bayo that was dangerous.
But despite the disadvantage, Equatorial Guinea should have gone ahead just minutes later when Iban Salvador was clipped from behind in the penalty area by wing-back Sekou Sylla.
It took a lengthy VAR review before the referee awarded the kick but Emilio Nsue, the tournament's leading scorer with five goals, hit his effort against the upright with the goalkeeper going the other away.
Equatorial Guinea then looked to play for time and try and force the game to an extra 30 minutes and post-match penalties.
However, Guinea snatched victory to end the fairytale run of the small central African nation, who had finished ahead of hosts Ivory Coast and Nigeria in Group A and who on Monday produced a shock by thrashing the Ivorians 4-0.
Guinea had the best chance of a pedestrian first half when they broke on the counter-attack after defending a corner and Aguibou Camara was running toward the opposing goal, but then inexplicably hesitated and allowed full back Basilio Ndong to steam across from the left and make a convincing tackle.
Guinea now meet the winner of Sunday's later game between the Democratic Republic of Congo and Egypt in San Pedro