The holders and hosts are both out as Nigeria and South Africa pulled off big wins. Odion Ighalo was the star for Nigeria, who recovered to beat Cameroon, while a late Thembinkosi Lorch goal stunned Egypt in Cairo.
Nigeria 3-2 Cameroon
(Ighalo 19', 63', Iwobi 66' - Bahoken 41', Njie 44')
Nigeria came from behind to knock out Cameroon and reach the quarterfinals in a helter-skelter last 16 battle.
Nigeria took the lead with a scrappy goal through Odion Ighalo, whose deflected shot deceived Andre Onana in goal after Cameroon failed to clear a Nigeria freekick.
Cameroon turned the game on its head though, with two goals in the four minutes before halftime. The first came courtesy of Stephane Bahoken who connected with Christian Bassogog's pinpoint cross from the left.
Cameroon, coached by Dutch duo Clarence Seedorf and assistant Patrick Kluivert, ensured they had their noses in front at the break when Clinton Njie's raw pace allowed him to reach Bahoken's flick on and slide the ball past Nigeria goalkeeper Daniel Akpeyi.
But as darkness fell in Alexandria, Nigeria kept creating chances and a quickfire double of their own ultimately settled the game in their favor. Ighalo got the equalizer, powering in from close range after he was teed up by Ahmed Musa's clever pass.
The winner came three minutes later through Arsenal's Alex Iwobi. This time Ighalo turned provider as the striker sent a neat through ball to Iwobi, who drove forward and slotted his shot past Onana.
With six minutes to play, Ighalo had a chance to cap a fine individual display with his hat trick and a fourth goal for Nigeria, but Onana, who plays his football for Champions League semifinalists Ajax, pulled off a stunning one-handed save low to his right.
Egypt 0-1 South Africa
South Africa stunned tournament hosts and one of the favorites Egypt with a late winner in Cairo.
With the game locked at 0-0 with five minutes to play, Thembinkosi Lorch, featuring in his first game of the tournament scored his first ever goal in South Africa colors – and he may never score a more crucial one.
The goal left the sold out Cairo international Stadium silent as South Africa celebrated their first Africa Cup of Nations quarterfinal since 2013.
Their reward is a tough last eight assignment against Nigeria.