Hashim Amla and Dean Elgar each made the most of an early reprieve to record half-centuries and earn South Africa a six-wicket victory over Pakistan in the first Test on Friday.

The Proteas began the third day in Centurion chasing 149 to take a 1-0 lead in the three-match series, after Duanne Olivier's 5-59 had helped bowl the tourist out for 190 at stumps on Thursday.

READ| SA v PAK 2018-19: Controversy over umpiring mars win

It looked as though the crowd at SuperSport Park could be in for a thrilling conclusion when Aiden Markram's poor run of form continued with a second-ball duck but Pakistan was made to rue two crucial moments going the way of the home side.

Early reprieves

Amla, on eight at the time, was dropped at slip by Fakhar Zaman after slashing at Hasan Ali, and in the next over Elgar - on four - edged Shaheen Afridi low to Azhar Ali in the cordon, only for the on-field soft signal of out to be overturned by the television umpire.

Replays suggested the ball touched the grass and Azhar's fingers simultaneously and Elgar capitalised on his second chance, going on to make 50 while his partner was 63 not out - a welcome return to form for Amla after 10 innings without a fifty.

Amla proved the rock of a chase that began in nervy fashion as Markram departed lbw to Hasan before a run was on the board.

Indeed, it took until the 34th delivery before the first runs were scored off the bat as Amla struck back-to-back leg-side boundaries off Hasan to relieve some of the pressure.

His and Elgar's moments of fortune arrived soon afterwards, and Pakistan further damaged its own cause by wasting reviews in attempting to overturn a pair of lbw decisions either side of lunch - Mohammad Amir the bowler on each occasion.

Return to form

Amla's first half-century since early March arrived from 88 balls as he guided Shaheen to the point fence and Elgar followed suit with a glorious drive off Shan Masood as South Africa moved to within 30 of victory.

Elgar edged behind next ball and both Theunis de Bruyn and Faf du Plessis fell with the target in touching distance.

De Bruyn was stumped after coming down the track to Yasir Shah and missing an attempted legside heave while South Africa's captain Du Plessis went for a pair, just as his Pakistan counterpart Sarfraz Ahmed had.

Yet Amla stuck around and the second of Temba Bavuma's two fours sealed the victory inside 51 overs.