CAIRO (AP) — South Africa scored with five minutes left to beat Egypt 1-0 and knock the stunned host and favorite out of the African Cup of Nations in the Round of 16 on Saturday.
Thembinkosi Lorch got the winner on a counterattack to silence 75,000 fans at Cairo International Stadium.
South Africa only qualified for the last 16 as the lowest-ranked of the four third-placed teams to make it through.
But South Africa's defense stifled Egypt star Mohamed Salah to give the team a platform to win.
South Africa progressed to a quarterfinal against Nigeria, while Egypt and Salah were left bitterly disappointed with an early exit from their home tournament.
Nigeria earlier beat defending champion Cameroon 3-2 in a wild last-16 game.
Nigeria scored first before Cameroon replied with two goals in three minutes at the end of the first half to lead 2-1. Nigeria then did the same to go ahead again with two goals in a three-minute spell after halftime.
Odion Ighalo scored two of Nigeria's goals and Alex Iwobi snatched the winner in the 66th to put the 2013 champion into the quarterfinals.
Cameroon's exit is a major disappointment for the high-profile coaching team of former Netherlands internationals Clarence Seedorf and Patrick Kluivert appointed to lead the team's title defense.