South Africa reached 51-2 in their second innings while chasing a target of 277 runs on the third day of the Lahore Test against Pakistan.
At stumps, Ryan Rickelton was unbeaten on 29, while Tony de Zorzi was batting on 16.
Pakistan now need eight wickets to win, whereas the visitors require 226 more runs to seal victory. Spinner Nauman Ali claimed both South African wickets to keep the hosts in the contest.
Earlier, Pakistan were bowled out for 167 in their second innings. Combining their first-innings lead of 109, Pakistan set South Africa a target of 277 runs to win the match.