Keshav Maharaj lead a bright start to the second Test for the Proteas before Pakistan hit back to end a rain-hit day one strongly in Rawalpindi on Thursday.
The slow left-armer had to shoulder some extra responsibility after an injury to George Linde early on in the match, but responded admirably by claiming two for 51 in an excellent 25 overs, although the hosts recovered to reach the close on 145 for three.
Maharaj’s early double, added to a wicket for Anrich Nortje (1/30), had initially put the visitors in control on 22 for three.
But Pakistani captain Babar Azam lead the fightback with an unbeaten 77 (125 balls, 12 fours) and shared in an unbroken 123-run partnership with Fawad Alam (42) that shifted the tide of the game.
The day had started out with the home side, already 1-0 up in the two-match series, winning the toss and opting to bat first at the Rawalpindi Cricket Stadium.
South Africa had drafted in Wiaan Mulder in place of Lungi Ngidi as their only change to their XI, but it was Maharaj that did the early damage – which looked imminent from the time he was introduced to the attack in the eight over and had Imran Butt dropped first ball.
He continued to pose a threat and was rewarded in his third over by drawing an edge from that same batsman that was snapped up by Quinton de Kock for 15.
In his next over, the spinner had Azhar Ali trapped leg before wicket for a duck and Abid Ali (6) departed shortly after caught expertly by Aiden Markram off Nortje at short leg.
That left Pakistan in a big hole after the opening hour.
However, Babar and Fawad then batted together for 43 overs to bring their side right back into the contest, before rain intervened and ended play 32 overs short.