|Second Test, Rawalpindi (day four):|
|Pakistan 272 (Babar 77, Nortje 5-56) & 298 (Rizwan 115*; Linde 5-64)|
|South Africa 201 (Hasan 5-54) & 127-1 (Markram 59*, Van der Dussen 48*)|
|South Africa need 243 more runs to win|
Mohammad Rizwan scored his maiden Test century but South Africa fought back against Pakistan to leave the match intriguingly poised on day four of the second Test in Rawalpindi.
The Pakistan wicketkeeper hit 111 not out as the hosts put on 102 for their last two wickets to set South Africa a victory target of 370.
Aiden Markram and Rassie van der Dussen shared an unbroken 94-run stand for the second wicket to leave South Africa 127-1 at close of play, needing 234 more to win on the final day.
Pakistan won the first Test by seven wickets with the the two-Test series marking the Proteas' first tour of the country since 2007.
After Pakistan began the day on 129-6. exactly 200 ahead, Hasan Ali was soon trapped lbw by Keshav Maharav for five.
However, Rizwan, who had failed to convert six previous half-centuries in 12 Tests, extended the lead with a fine display, hitting 15 boundaries in his 204-ball innings.
Rizwan was well supported by tail-enders Yasir Shah (23) and Nauman Ali, who scored 45 batting at number 10.
South Africa spinner George Linde - who dislocated a finger on day one - bowled last man Shaheen Afridi to finish with 5-64 as Pakistan were eventually dismissed for 298.
In reply, the tourists lost opener Dean Elgar for 17 after he was caught behind by Rizwan off Shaheen.
However, Elgar's opening partner Markram hit nine fours and two sixes on his way to an unbeaten 59, while Van der Dussen is 48 not out going into an intriguing fifth day.