Lahore: Younis Khan hit an impressive hundred to halt South Africa's march towards victory in the second and final Test at the Gaddafi Stadium here on Friday.
Younis was unbeaten on 107 to lift Pakistan to 222-2 at lunch on the fifth day and keep their hopes of saving the Test alive.
Pakistan need to bat a maximum of 47 overs to draw the Test and 235 runs for an unlikely win.
Mohammad Yousuf was the other unbeaten batsman with 21 at the break.
South Africa, who set the home team a mammoth target of 457 to win, lead the two-Test series after winning the first in Karachi by 160 runs.
Younis added an invaluable 161 runs for the second wicket with Kamran Akmal (71) to steady Pakistan's innings after they resumed at 108-1.
Younis, 49 overnight, raced to his half-century with a flurry of boundaries, hitting five in the space of seven balls to punish Makhaya Ntini and Jacques Kallis.
He was lucky on 83 when Hashim Amla dropped an uppish flick at square-leg off Kallis.
Left-arm spinner Paul Harris provided the tourists the much-needed breakthrough when an arm ball took the edge of Akmal's bat and hit the stump.
Akmal hit eight boundaries during his 225-minute knock.
Younis, who made 126 in Karachi, reached his tonne with a push for single. He hit 14 boundaries in his century which took 253 minutes.
Yousuf provided Younis support during their unbroken 46-run stand for the third wicket to further raise hopes of a fighting draw in the extended three-hour session due to Friday prayers.
Brief Scores (at lunch, D-5):
South Africa 357 and 305 for 4 decl Vs Pakistan 206 and 222 for 2 (Younis 107 n o, Akmal 71, Yousuf 21 n o; Harris 1 for 35, Ntini 1 for 47).