Home side takes a one-nil lead in three-match series.
Chasing a target of 149 runs, South Africa registered victory with the help of half-centuries from opener Dean Elgar and experienced campaigner Hashim Amla.
Pakistan made an ideal start when Hasan Ali trapped Aiden Markram leg before wicket before a run had been scored.
Hasan and Mohammad Amir did not concede a run off the bat until Hashim Amla clipped Hasan for four in the sixth over.
There were two crucial incidents with the total on 16, either of which could have swung the game in Pakistan's favour.
Amla, on eight, was dropped by Fakhar Zaman at third slip off Hasan when he slashed hard at the ball, which flew at chest height to the fielder.
In the next over, Dean Elgar, on four, edged new bowler Shaheen Shah Afridi low to first slip where Azhar Ali appeared to take a diving catch.
On-field umpires Bruce Oxenford and Sundaram Ravi conferred before referring to television umpire Joel Wilson with a 'soft' signal of out, indicating they thought it was a clean catch.
After looking at several replays including super-slow close-ups, Wilson ruled the ball had bounced and Elgar was reprieved.
The decision clearly astonished the Pakistan players and coach Mickey Arthur was seen leaving his place on the players' balcony and going to the adjacent office of match referee David Boon.
Amla and Elgar put on 119 for the second wicket to put South Africa within touching distance of victory.
Elgar was dismissed — after playing a well-compiled 50-run innings — by an unlikely bowling candidate in Shan Masood.
Theunis de Bruyn (10) and captain Faf du Plessis (0) departed soon after but that only delayed the inevitable as Amla and Temba Bavuma — unbeaten on 63 and 13 runs respectively — took the side home.
For Pakistan Hasan Ali, Shaheen Shah Afridi, Shan Masood and Yasir Shah took one wicket each.
Duanne Olivier was bagged the award for the player of the match for claiming match figures of 11-96 and dismantling Pakistan batting lineup in both innings.
The second Test between the two sides is scheduled to take place in Cape Town from January 3, 2019.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ