At the close of play, the SA team were on 51/2, needing 226 runs to win with eight wickets in hand.
Though they still had a lot of work to do, spin bowlers Senuran Muthusamy and Simon Harmer combined well after middle-order batter Tony de Zorzi hit a ton, keeping South Africa in the hunt on Tuesday in the first Test against Pakistan in Lahore.
At the close of play on day three, the Proteas were still on the back foot on 51/2, needing 226 runs to win. Opener Ryan Rickelton was on 29 not out and De Zorzi was unbeaten on 16.
Pakistan second innings
Earlier, with Pakistan taking a 109-run lead into their second innings, they were bowled out for 167 (within 47 overs) in the final session of the day.
After a lower-order collapse saw the hosts losing their last five wickets for 17 runs, they set the Proteas a target of 277 runs to win.
Muthusamy was particularly impressive, taking 5/57 for a match return of 11/174, while Harmer (4/51) also took advantage of the conditions to give the SA team some hope of fighting for victory.
Grabbing 11 wickets, Muthusamy secured his first 10-wicket haul in Test cricket, comfortably surpassing his largest bag of five wickets in his previous five Tests.
Proteas first innings
In the morning session, the Proteas had resumed their first innings at 216/6, with De Zorzi on 81 and Muthusamy on six.
Muthusamy was removed for 11 runs in the fifth over of the day, and De Zorzi went on to reach 104 – his second Test century – after facing 171 balls and spending more than three hours at the crease overnight.
After De Zorzi was dismissed when left-arm spinner Noman Ali had him caught by Shaheen Afridi on the long-on boundary, the Proteas were ultimately bowled out for 269.