Holders Cameroon were knocked out of the Africa Cup of Nations by Nigeria in a five-goal last-16 thriller.
Goals from Stephane Bahoken and Clinton Njie saw Cameroon lead 2-1 at half-time after Odion Ighalo had put Nigeria ahead in Alexandria, Egypt.
But two goals in three minutes swung the game back in Nigeria's favour and set up a quarter-final with either hosts Egypt or South Africa.
Ighalo equalised before the forward set up Alex Iwobi to hit the winner.
Nigeria had been on the receiving end of an upset in their previous game, a 2-0 defeat by Madagascar in their final group match.
Yet they produced their performance of the tournament to ends Cameroon's hopes of retaining the title they won in Gabon in 2017.
Ighalo's deflected shot gave Nigeria the lead before Bahoken side-footed the equaliser after Christian Bassogog's cross.
In an enthralling tie, Cameroon took the lead through Njie's composed finish.
Man-of-the-match Ighalo made it 2-2 with a volley after Ahmed Musa's chest down before Ighalo turned provider for Arsenal's Iwobi to slot in a dramatic decisive goal.