Fawad Alam and skipper Babar Azam's contrasting knocks revived Pakistan innings in the second Test against South Africa before rain played spoilsport in Rawalpindi on Thursday.
Pakistan was 22/3 in the morning but Fawad and Babar racked up an unbroken 123-run stand to snatch the advantage from South Africa on day one of the second Test.
At stumps, Pakistan's score read 145/3 with Fawad and Babar unbeaten on 42 and 77 runs respectively. For South Africa, Keshav Maharaj picked two, Anrich Nortje took one while Kagiso Rabada went wicketless.
Opting to bat first, Pakistan got off to the worst possible start as Maharaj, who had to shoulder some extra responsibility after an injury to George Linde early on in the match, responded admirably by claiming two for 51 in an excellent 25 overs.
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 Babar lead the fightback with an unbeaten 77 (125 balls, 12 fours) and shared in an unbroken 123-run partnership with Fawad (42) that shifted the tide of the game.
The hosts recovered to reach the close on 145 for three.
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 the 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.
Brief Scores: Pakistan 145/3 (Babar Azam 77*, Fawad Alam 42*; Keshav Maharaj 2-51)