Hashim Amla has struck an unbeaten half-century to help South Africa brush aside some early alarms and record a six-wicket victory over Pakistan on an at-times controversial third and final day of the first Test at Centurion Park.

Chasing a modest 149 to win in testing batting conditions, Amla took his side home shortly before tea with 63 not out to rediscover his form with just a second fifty from his past 14 innings on Friday.

He put on 119 for the second wicket with gritty opener Dean Elgar (50) to lay the platform for the win, though both survived early scares as Pakistan's seamers created immense pressure on a wicket that showed both sideways movement and variable bounce.

The second Test begins in Cape Town on January 3 with the series to conclude in Johannesburg on January 11.

Starting their second innings chase under gloomy skies after overnight rain, South Africa opener Aiden Markram was trapped leg before wicket by Hasan Ali (1-39) for a duck before the home side had a run on the board.

Pakistan bowled with skill and accuracy, and beat the bat on numerous occasions before Amla was dropped on eight at third slip by Fakhar Zaman.

Pakistan's irritation grew when moments later they thought they had Elgar caught at first slip when he was on four.

Seamer Shaheen Afridi (1-53) induced the edge that looked to have been gobbled up by Azhar Ali. Elgar began walking towards the dressing room, but was called back when the on-field umpires conferred over whether the catch had been taken.

It was sent to third umpire Wilson with a soft signal of 'out', which called for conclusive evidence for the decision to be overturned.

After looking at several replays, including super-slow close-ups, Wilson ruled the ball had bounced and Elgar was reprieved.

After the match, Pakistan coach Mickey Arthur was given an official warning by the ICC and fined one demerit point for showing dissent towards Wilson following the decision.

"The incident happened in the ninth over of South Africa's second innings when Arthur, after TV umpire Joel Wilson had decided in favour of Dean Elgar, entered the TV umpire's room and showed dissent at Mr Wilson's decision by first questioning him and then storming out of the room.

"After the match, the Pakistan coach admitted the offence and accepted the sanction proposed by match referee David Boon. As such, there was no need for a formal hearing."

It was a potentially game-changing moment in the innings with South Africa on 1-16 at the time.

"I'm convinced he was out," said television commentator Michael Holding. "I think the third umpire made a mistake. The protocol says you have got to be 100 percent sure the decision was wrong to change it."

Pakistan captain Sarfraz Ahmed said after the match: "The third umpire thought it bounced. The on-field umpires thought it was out and for me it was a clear catch."

Elgar and Amla capitalised on that good fortune and both went on to make half-centuries.

Elgar (50) then handed a first Test wicket to Pakistan part-timer Shan Masood when he had a swipe at a loose delivery and was caught by wicketkeeper Sarfraz Ahmed.

Theunis de Bruyn (10) was stumped off Yasir Shah (1-20) trying to finish the game with quick runs and home captain Faf du Plessis recorded a pair of ducks in the match when he attempted a hook off Afridi and was caught at fine leg.