Inzamam-ul-Haq has missed out on Pakistan's all-time Test run-scoring record, but the hosts held on for a draw in Lahore.
The former Pakistan captain, who will call time on his international career at the close of the final Test against South Africa, required just 20 runs in the match to break Javed Miandad's record.
But having been dismissed for just 14 runs by a combination of Mark Boucher and Jacques Kallis in the first innings, he fell agonisingly short of his target on Friday.
Inzamam was stumped by wicketkeeper Boucher off the bowling of slow left- arm bowler Paul Harris for just three runs.
He finishes with a total of 8,830 runs to his name, two short of equalling Miandad's record.
Pakistan were set a notional world record target of 457 by South Africa to level the two-match series and finished the day on 316-4, 141 adrift.
Younus Khan made 130 and Kamran Akmal 71, while Mohammad Yousuf finished unbeaten on 63.
South Africa won the first Test in Karachi by 160 runs.