Stumps Pakistan 129 for 6 (Rizwan 28*, Hasan 0*) and 272 (Ashraf 78*, Nortje 5-56) lead South Africa 201 (Bavuma 44*, Hasan 5-54) by 200 runs
Mohammad Rizwan and Faheem Ashraf put on 52 for the sixth-wicket to push Pakistan's lead to 200 after South Africa's spinners bowled them back into the game. Keshav Maharaj and George Linde shared five wickets between them to leave Pakistan 76 for 5, ahead by 147 runs, but three dropped catches undermined a disciplined effort by the attack and will mean South Africa face a tough chase.
The Rawalpindi surface continues to show signs of variable bounce and keep low, and while South Africa's seamers did not get any reverse swing, Pakistan's attack had it in significant supply. They forced a collapse of the South African lower order, who lost five wickets for 37 runs, and bowled them out for 201, 71 runs behind Pakistan's first innings score. That lead, as well South Africa's mistakes in the field, could prove decisive in the series outcome.
Faheem was dropped on 0, by Dean Elgar at slip off Linde, when he got a thick outside edge. Linde bowled nine overs, more than his 5.5 in the first innings, when he lacerated the little finger on his bowling hand. With substantial dressing on the injury, he has managed to find a way to continue to play a part in the game.
The very next ball saw Rizwan put down on 4 as he inside-edged Maharaj to Rassie van der Dussen at silly point. The ball was dying on van der Dussen, who moved forward quickly, but could not quite reach it. South Africa's also gave a chance to Azhar Ali, who was on 28 when Temba Bavuma could not hold on to a chance at legslip. Azhar went on to make 33 so the damage was not as severe as the other two missed opportunities.
The fielding lapses will sting for South Africa, both because of their reputation in the field and because Pakistan were much more effective. Shaheen Shah Afridi and Abid Ali ran out Wiaan Mulder and Kagiso Rabada respectively, to take Pakistan's total run-outs in the series to four.
Mulder was part of the most accomplished partnership South Africa posted, 50 runs for the sixth-wicket with Temba Bavuma, who was left stranded on 44 not out. Bavuma built his innings slowly after he successfully reviewed being given out lbw to Hasan Ali in the fourth over of the morning. By then, Quinton de Kock had been bowled by Afridi, driving away from his body after adding just five runs to his overnight score. Bavuma scored just five runs off two scoring shots off the first 42 balls he faced on the third morning, and allowed Mulder to play the more proactive role.
Mulder was confident against both pace and spin but his boldness in taking on Afridi's arm was his undoing. He flicked Hasan to fine leg and pushed for a second run but Afridi fired in a strong throw right over the bails for Mohammed Rizwan to collect and catch Mulder short of his ground.
Linde should have been out off the fourth ball he faced when he gloved a Hasan short ball, but Babar Azam opted not to review. Hasan got his revenge, though, and bowled Linde after a breezy run-a-ball 21. He then muscled through Maharaj's defence with an inswinger to take out middle-stump and knocked the top of Anrich Nortje's offstump as the No.11 shouldered arms.
While South Africa's batting was careless at times, their bowling was the exact opposite and, as they have done throughout the Test, the bowlers kept Pakistan's scoring rate in check. Rabada and Nortje started the innings with 25 dot balls, which included a wicket, Rabada's first in the match. He trapped Imran Butt lbw in front of middle stump to end a challenging series for the new opener. Butt has scored 36 runs in four innings and Pakistan's first-wicket pair has shared a highest stand of 22, underlining the problems they have at the top of the order.
The first run came off the 26th ball, from Azhar, who held firm against Nortje's pace. Nortje was used in two short spells of three overs each, delivered a fastest ball of 149kph, and mixed attacking the body with fuller balls. However, he has yet to add his five wickets from the first innings.
Instead, it was Maharaj, introduced in the eighth over, who troubled the Pakistan batsmen more. He had Abid caught behind off the sweep and then removed Azam for the third time in four innings as the home captain failed to defend a delivery that drifted in and struck him on the front pad.
With Maharaj building pressure on one end, de Kock installed Linde at the other and in his third over, he beat Azhar's inside edge to trap him lbw. Azhar reviewed but replays showed the ball would have hit leg-stump. Four overs later, Linde got one to spin into Fawad Alam and the edge popped onto his pad and up to Aiden Markram at short leg.
Sensing an opportunity to burrow through the lower-order, de Kock went back to Nortje, but Rizwan was comfortable against the short ball and Ashraf strong on the offside, and the tactic did not work. It was only when Linde was brought back that Ashraf was lured into a loose drive and offered Nortje a catch at backward point. By then, Ashraf, who could have been dismissed for a duck had scored 29 runs and shared in a partnership with Rizwan that could be the difference between these two teams.
Firdose Moonda is ESPNcricinfo's South Africa correspondent