Match ends, Egypt 0, South Africa 1.
South Africa knocked hosts Egypt out of the Africa Cup of Nations and booked their place in the quarter-finals with a late winner in Cairo.
With Egypt throwing players forward, Thembinkosi Lorch struck on the counter-attack after 85 minutes.
Mahmoud Trezeguet had the hosts' best chance, but he fired at the goalkeeper.
Egypt have followed holders Cameroon out of the tournament, while South Africa will return to Cairo to play Nigeria in the last eight on Wednesday.
Before the game, Bafana Bafana coach Stuart Baxter spoke about causing an Egyptian "national disaster", and his team played with an intensity to match their game plan from the first whistle.
The visitors frustrated Egypt by remaining in their shape while showing attacking intent at the other end as the impressive Percy Tau pulled the strings.
Liverpool striker Mohamed Salah - who shook off a cold to make the Egyptian starting XI - had a disappointing evening after firing a half-volley wide in the early stages.
Egypt ran out of ideas in front of an anxious home crowd at the Cairo International Stadium, as Lorch ran onto Lebo Mothiba's square pass to calmly slot the ball past Mohamed El-Shenawy.
Analysis
BBC Sport's Mohamed Qoutb in Cairo
This was a great display from South Africa in front of thousands of Egyptian fans, who saw one of the poorest versions of the Egypt team in the history of the Cup of Nations.
South Africa kept control of the midfield and were stubborn in blocking Egypt's attacking play.
Egypt manager Javier Aguirre tried to press for the winner but his tactics gave South African the chance to counter-attack, and they took advantage.
Line-ups
Egypt
Formation 4-2-3-1
- 16Mohamed El-Shenawy
- 3El Mohamady
- 20Alaa Eldin
- 6Hegazi
- 12AshrafBooked at 68mins
- 8Hamed
- 17ElnenySubstituted forSoliman Saidat 83'minutes
- 10Salah
- 19El SaidSubstituted forWardaat 64'minutes
- 7Trézéguet
- 9MohsenSubstituted forAli Kamelat 45'minutes
Substitutes
- 1Razek El-Shenawy
- 2Morsy El Mohamady
- 4Gaber
- 5Mohamed Ghazal
- 11Soliman Said
- 13Mansour
- 14Ali Kamel
- 15Hamdi
- 21Emad
- 22Warda
South Africa
Formation 4-3-3
- 22Williams
- 5Mkhize
- 14HlatshwayoBooked at 90mins
- 2Mkhwanazi
- 18HlantiBooked at 44mins
- 8ZunguBooked at 79mins
- 15FurmanSubstituted forKekanaat 90+2'minutes
- 12Mokotjo
- 19Tau
- 9Mothiba
- 23LorchSubstituted forVeldwijkat 90+3'minutes
Substitutes
- 1Keet
- 3Maela
- 4Cardoso
- 6Mphahlele
- 7Maboe
- 10Serero
- 13Mabunda
- 16Bvuma
- 17Vilakazi
- 20Kekana
- 21Veldwijk
- Referee:
- Eric Otogo-Castane
- Attendance:
- 75,000
Match Stats
- Possession
- Home62%
- Away38%
- Shots
- Home15
- Away14
- Shots on Target
- Home3
- Away6
- Corners
- Home3
- Away3
- Fouls
- Home15
- Away20
Live Text
Post update
Full Time
Second Half ends, Egypt 0, South Africa 1.
Post update
Ayman Ashraf (Egypt) wins a free kick on the left wing.
Post update
Foul by Lars Veldwijk (South Africa).
Booking
Thulani Hlatshwayo (South Africa) is shown the yellow card for a bad foul.
Post update
Trézéguet (Egypt) wins a free kick in the defensive half.
Post update
Foul by Thulani Hlatshwayo (South Africa).
Post update
Attempt saved. Lars Veldwijk (South Africa) right footed shot from the right side of the box is saved in the centre of the goal. Assisted by Percy Tau.
Substitution
Substitution, South Africa. Lars Veldwijk replaces Thembinkosi Lorch.
Substitution
Substitution, South Africa. Hlompho Kekana replaces Dean Furman.
Post update
Delay over. They are ready to continue.
Post update
Delay in match because of an injury Percy Tau (South Africa).
Post update
Ayman Ashraf (Egypt) wins a free kick in the defensive half.
Post update
Foul by Percy Tau (South Africa).
Goal!
Goal! Egypt 0, South Africa 1. Thembinkosi Lorch (South Africa) right footed shot from the centre of the box to the bottom right corner. Assisted by Lebo Mothiba.
Substitution
Substitution, Egypt. Walid Soliman replaces Mohamed Elneny.
Post update
Foul by Mohamed Salah (Egypt).
Post update
Sfiso Hlanti (South Africa) wins a free kick in the defensive half.
Post update
Tarek Hamed (Egypt) wins a free kick in the defensive half.
Post update
Foul by Percy Tau (South Africa).