Corbin Bosch's dream outing continued as he scored his maiden half-century off 46 balls and the highest score by a No.9 batter on debut in Tests as he built South Africa's 90-run first-innings lead.
In reply, Pakistan were 88 for three with Babar Azam (16) and Saud Shakeel (8) – both unbeaten – at the crease.
Coming in to bat for the second innings, Pakistan faced an early blow as power pacer Kagiso Rabada struck and Saim Ayub got out after scoring 28 runs leaving Pakistan just one-run short of the 50-run mark.
Babar Azam joined Shan Masood and together they built-up a short partnership of 21 runs as the skipper fell to Marco Jansen, giving South Africa a chance to repeat their first inning fierceness that led Pakistan to bundle out on 211 runs.
The pacer struck again in his very next over and dismissed Kamran Ghulam on just four runs.
When Pakistan was trailing by two runs, the match officials decided to delay the play due to bad light. The bails were pushed off the stumps and the players returned to the pavilion until further notice.
Pakistan ate into most of that in their second innings but lost three wickets and remained two runs behind, leaving South Africa with their noses in front.
The hosts, who need one more Test win to guarantee a place in the World Test Championship final, were at risk of squandering the opportunity to get ahead after collapsing from 178 for 4 to 213 for 8 but a 41-run stand between Bosch and Kagiso Rabada and a 47-run last-wicket partnership between Bosch and Dane Paterson gave them a healthy lead.
They did not maximise the advantage immediately and Pakistan's opening pair of Saim Ayub and Shan Masood put on 49 inside 11 overs before they lost 3 for 25 on a day that ebbed and flowed, more from entertainment than the quality of the cricket.
Both sets of batters will look back in some anger at the way they were dismissed. South Africa's middle order have questions over some ordinary shot selection while Pakistan, aside from their first innings collapse, now have to deal with signs of variable bounce as they look to build a target they can defend. Amongst those bigger picture narratives, was Bosch's delight as he ended unbeaten on 81 and was given the new ball in the second innings in a match where he his had a Midas touch.
Earlier in the first innings, Markram had been under pressure after a series of low scores for South Africa but showed his value to the team with chanceless knock that left South Africa 31 runs in arrears with five wickets in hand at Centurion.
Markram's steady flow of runs was a danger to Pakistan and resuming after lunch, the batter was dismissed leaving South Africa at 213/8.
With an end to Markram's innings, Pakistan's players found themselves back in the game. Still, a fiery cameo from Bosch sidetracked the team.
Bosch, along with, Dane Paterson kept scoring runs whenever the Pakistani bowlers gave them a chance. However, their partnership could not be further extended after Peterson got out on 12 runs bringing an end to South Africa's first innings.
Pakistan's Khurram Shahzad and Naseem Shah grabbed three wickets each while Aamer Jamal dismissed two South African batters.
Pacer Mohammad Abbas grabbed one scalp whereas the last batter was dismissed by Saim Ayub.
South Africa were 82-3 overnight with Markram and Temba Bavuma putting on a further 54 runs before the skipper was dismissed, offering a thick outside edge to a delivery from Aamer Jamal and was caught behind for 31.
Bedingham was characteristically attacking in his short spell at the crease, scoring 30 runs off 33 balls before extra bounce from Naseem Shah saw him edge to Kamran Ghulam in the slips.
South Africa need to win one of the two-match series against Pakistan to reach the WTC final at Lord's in June, adding extra pressure to the contest.
They have won their last seven home tests against Pakistan.
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