Lahore: Inzamam-ul Haq fell agonizingly short of a Pakistan runs record in his final Test as the home team fought for a draw on day five of the second Test against South Africa on Friday.
Inzamam was stumped for three, just three away from outstripping Javed Miandad's all-time Test mark, after Younis Khan's brilliant 130 kept Pakistan alive at the Gaddafi Stadium.
The home team reached 282-4 at tea, still needing to bat a maximum 26 overs to avoid defeat or score 175 for an unlikely win.
Mohammad Yousuf was unbeaten on 48 and with him captain Shoaib Malik on two as South Africa, leading 1-0, pushed for their first series win in the subcontinent since 2000.
Former captain Inzamam jumped out of his crease to hit left-arm spinner Paul Harris but was stumped by Mark Boucher.
The 37-year-old batsman finished with 8,830 runs, including 25 hundreds, in 120 Tests. Miandad's record is 8,832.
But before Inzamam's dreams were shattered, Younis kept the home side afloat with a masterly knock which lasted 10 minutes short of six hours. Younis hit 16 boundaries during his 14th Test hundred.
He added 89 runs for the third wicket with Yousuf and 161 runs for the second wicket with Kamran Akmal, who made 73.
The 29-year-old Younis was finally dismissed when he edged trying to force a drive off Kallis and was caught behind by Boucher.
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, 49 overnight in Pakistan's score of 108-1, 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 with the much-needed breakthrough when an arm ball took the edge of Akmal's bat and hit the stumps.
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.
Brief Scores (at tea, D-5):
South Africa 357 and 305 for 4 decl VS Pakistan 206 and 282 for 4 (Younis Khan 130, Mohd Yousuf 48 n o; Harris 2 for 48, Kallis 1 for 42).