Lunch South Africa 188 for 7 (Bavuma 36*, Mulder 33, Maharaj 0*, Hasan 3-46) trail Pakistan 272 (Faheem 78*, Babar 77, Nortje 5-56, Maharaj 3-90) by 84 runs
Temba Bavuma led South Africa's resistance against a Pakistan attack that continued to control proceedings in Rawalpindi on the third morning. Pakistan took three wickets to add to their four from the second day to open the door to South Africa's tail and would be eyeing a lead on a surface that is keeping low and aiding reverse swing.
Hasan Ali and Shaheen Afridi made good use of late movement and posed problems for all South Africa's batsmen, starting with Quinton de Kock. The South Africa captain appeared in the same aggressive mood he employed on the second evening and was eager to drive away from his body against Afridi, but played the shot one time too many. He inside-edged the tenth ball he faced on the day on to leg stump, having added only five runs to his overnight score. He has now scored 74 runs in five Test innings since being named temporary Test captain - his latest effort of 29 only added to the conversation of whether the leadership burden has been affecting his batting form.
In the next over, Bavuma was given out lbw to a Hasan delivery that jagged back in to hit pad, but he reviewed the decision and was found to have inside-edged it. That only sent Bavuma further into his shell as he relied on his defence and patience and scored just five runs off the first 42 balls he faced, which included just two scoring shots.
The go-slow has pitfalls, particularly that it can cause an innings to stagnate, but Bavuma had a more proactive partner in Wiaan Mulder on the other end. Though the pair did not rotate strike much at first, Mulder found confidence against both pace and spin, demonstrated when he stepped down the track to loft Yasir Shah for six over long-off.
Pakistan hoped they had seen the last of him when Mulder, on 25, was rapped on the front pad by Hasan. Replays confirmed that Mulder had hit the ball. He went on to whip Hasan to fine leg later that over as his confidence grew. His partnership with Bavuma reached 50, South Africa's highest of the match, and was set up to go on for more but, two overs later, Mulder played a shot in the same area and wanted two runs from it. He took on Afridi's arm, and lost. The fast bowler fired in a strong throw right over the bail for Mohammad Rizwan to collect and catch Mulder short. That was Pakistan's third run-out of the series.
Pakistan should have had another wicket in the same over when George Linde gloved a Hasan short ball, but Rizwan was unconvinced. With the Mulder mistake fresh in his mind, Babar Azam opted not to review much to Misbah-ul-Haq's irritation. The coach was seen in the dressing room indicating that Pakistan would have had a third wicket. Linde made the most of his let-off and batted with freedom for a run-a-ball 21 before he was bowled by a Hasan slower ball.
Shah put down a difficult chance off Keshav Maharaj at third slip as the session was drawing to a close and Maharaj was then given out lbw to Hasan the ball before lunch. He reviewed and replays showed the ball missing leg stump.
Firdose Moonda is ESPNcricinfo's South Africa correspondent