Pakistan, however, lost all the momentum as Philander dismissed in-form Shan Masood (2) and Azhar Ali (nought) in consecutive deliveries. Both batsmen fell to away-swingers, nicking to the wicketkeeper.
The visiting team was 17 for 2 in nine overs, still trailing by 245 runs, with Imam-ul-Haq and nightwatchman Abbas unbeaten on 10 and 0 respectively when stumps were drawn.
Earlier, having already clinched the series, South Africa won the toss and opted to bat first, but got off to a poor start with stand-in skipper Dean Elgar being caught behind off Abbas for five in the second over. Markram was then joined by Hashim Amla and the two ensured that the home team didn't lose any more wickets in the morning session.
The track offered was hands down the best of the series and Markram made the most of it. The right-hander, who had to pass a fitness test after suffering a badly bruised right thigh while fielding in the second Test in Cape Town, gave a sharp chance to short leg Shan Masood off Amir when he had two, but otherwise looked in command. Markram crafted 14 boundaries during his knock, marked by crisply-struck drives and clips to leg. He took the attack to Hasan and didn't allow him to get into any sort of rhythm.
Meanwhile, Amla was content to play a supporting role in a partnership that was worth 126. Markram looked set for his fifth Test century before he glanced a ball from medium-paced all-rounder Ashraf and wicketkeeper Sarfraz Ahmed plucked a good catch diving to his left. Amla too didn't survive for long and was caught at slip while playing a needless cut off leg-spinner Shadab. The No. 3 batsman managed six fours in his 41-run knock.
Theunis de Bruyn and debutant Zubayr Hamza, however, didn't allow Pakistan to breathe easy and added 75 runs for the fourth wicket. Hamza replaced suspended regular captain Faf du Plessis and became South Africa's 100th Test cap since the country returned to international cricket in 1991. The 23-year-old announced his arrival with a maximum over cow corner before playing a couple of eye-pleasing shots square of the wicket. De Bruyn too looked solid during his stay and pounced on every bad delivery.
South Africa were cruising along nicely at 229 for 3 and looked set for a big first innings score, but that's when Abbas and Mohammad Amir pulled up their socks. Abbas first pinned de Bruyn right in front of stumps for 49 before Amir sent Temba Bavuma back for just 8 runs. Hamza was the next one to depart, edging Amir's delivery to the wicketkeeper for 41.
Hasan, who looked out of touch in the first two sessions, then got rid of Philander (1) and Kagiso Rabada (nought) as South Africa slumped to 257 for 8 in no time. With just two wickets left, Quinton de Kock started playing his shots but fell to Ashraf after scoring only 18. It was Ashraf who brought an end to South Africa's innings by dismissing Duanne Olivier for a duck.
For Pakistan, Ashraf picked up three wickets, while Abbas, Amir and Hassan took two scalps each. Leg-spinner Shadab too chipped in with a wicket of Amla.
First Published: January 11, 2019, 9:20 PM IST