South Africa won the series-opening test against Pakistan on Friday as Hashim Amla returned to form with an unbeaten half-century to anchor a shaky chase and see the home team prevail by six wickets.
Amla's 63 not out guided the Proteas to victory as they finished on 151-4 before tea on Day 3 at SuperSport Park, passing the target of 149 but not without a series of scares at both the beginning and end of their second innings.
South Africa lost opener Aiden Markram in the first over and Amla was dropped in the slips when he was on 8.
An over after the Amla chance was missed by Pakistan, Dean Elgar survived a contentious umpiring decision that ruled out a catch that appeared to be good. Elgar was on 4 at the time. He went on to make 50 and share a 119-run partnership for the second wicket with Amla.
Elgar went a ball after reaching his 50, caught behind off medium-pacer Shan Masood.
In a shaky finish, Theunis de Bruyn (10) was stumped off Yasir Shah and captain Faf du Plessis was caught in the deep trying to hook an over after de Bruyn departed. South Africa needed just 12 runs to win at that point and it meant a pair of ducks for the South Africa skipper in the test.
Temba Bavuma was 13 not out to take South Africa over the line with Amla.
South Africa's nervous run-chase — the Elgar-Amla century partnership apart — came at the end of a seesaw match that ended well inside three days and which was dominated by pace bowlers on a green-tinged pitch. Both batting orders struggled.
Pakistan was out for 181 in its first innings, and South Africa replied with 223 all out. Pakistan was bowled out for 190 in its second innings to leave the modest target.
The game turned in the final session of Day 2 when Pakistan returned from tea 100-1 but went on to lose nine wickets for 89 runs.