Orlando Pirates forward Thembinkosi Lorch was the hero in Cairo as Bafana Bafana defeated hosts Egypt to advance to the Africa Cup of Nations quarter-finals.
Lorch was handed his first appearance of the tournament in place of the suspended Themba Zwane, while Dean Furman also returned to the midfield.
Egypt had the first opportunity of the match in the fourth minute when captain Ahmed El-Mohamady delivered the ball in to the box with the ball rebounding back off Thulani Hlatshwayo straight to Mohamed Salah, whose first-time left-footed effort went inches wide of the left-hand upright.
Bafana had their first decent attempt on goal in the 15th minute when they quickly broke on the counter-attack as Dean Furman played a diagonal to Thamsanqa Mkhize on the right, who released the ball quickly for Percy Tau, who cut inside on to his favoured left foot and struck a powerful effort towards goal but unfortunately for him it was straight at Pharaohs’ goalkeeper Mohamed El-Shenawy.
Bafana won a free-kick in a promising position in the 21st minute when Kamohelo Mokotjo was brought down by Trezeguet on the edge of the box. Tau curled a beauty towards the top right-hand corner but it was brilliantly tipped over the bar by El-Shenawy.
It was encouraging that Bafana were getting more numbers forward than they had in their previous matches, but it almost led to their downfall when the Pharaohs broke swiftly on the counter-attack through Salah, who fed an unmarked Trezeguet to his right, but the highly-rated midfielder shot straight at Ronwen Williams from the angle.
Shortly before the half-hour mark, Mkhize played the ball in to the box for Lorch after Tau had sold an intelligent dummy, but the Absa Premiership player of the Season dragged his effort wide of the right-hand upright.
Lorch then found room at the back post and fired a volley away at goal but it was bravely blocked. Soon after, Mokotjo skimmed an effort along the turf that went inches wide of the right-hand upright after being assisted by Mothiba.
Two minutes after the break, Arsenal midfielder Mohammed Elneny attempted a decent long-range effort but it went narrowly high and wide.
Five minutes later, El-Mohamady and Salah combined well before the latter struck a fierce effort towards goal but it was bravely blocked by Mkhwanazi, who well and truly put his body on the line.
It was all Egypt at the beginning of the second half and Trezeguet should have scored in the 57th minute when Salah released him with a lovely through ball in to the box but he could only side-foot the ball first-time straight at Williams, who made a routine save.
Bafana won a free-kick on the right flank in the 70th minute when Mokotjo was felled by Ayman Ashraf. Lorch whipped in the set-piece to the back post where Hlatshwayo rose above his marker but headed wide of the right-hand upright.
Soon after, Bafana played some slick one-touch football with Mkhize threading the final pass through for Lorch, whose effort was straight at El-Shenawy from the angle.
With five minutes to go, Bafana scored what would ultimately be the winner. A brilliant counter-attack released Mothiba down the right flank, who squared the ball for Lorch before the Orlando Pirates coolly slotted the ball around El-Shenawy and in to the bottom left-hand corner