Younis Khan scored a fighting 82 to help Pakistan post 230 in the fourth day-night international against South Africa at Multan Stadium on Friday.
Younis made his total off 110 balls with two sixes and six boundaries before pulling straight into the hands of Herschelle Gibbs off paceman Andre Nel, who finished with 2-44 to cap a strong return to the team.
Younis held the innings together with captain Shoaib Malik (45) after the home team won the toss and decided to bat.
Pakistan lead the five-match series 2-1 after back-to-back wins. South Africa won the first match in Lahore.
Younis added an invaluable 91 runs for the fourth wicket with Malik after Pakistan lost Shahid Afridi (nought), Yasir Hameed (10) and Mohammad Yousuf (five) by the 12th over.
Malik was more aggressive, hitting four boundaries during his 54-ball knock until Jacques Kallis broke the stand when Malik's miscued drive was well caught by skipper Graeme Smith at mid-off.
Nel, who replaced Charl Langeveldt in one of the two changes the tourists made for the match, struck twice in the 38th over. He removed Younis, caught off a mistimed pull and then had Misbah-ul Haq caught behind to leave Pakistan at 159-6.
Pakistan had a disastrous start to their innings, losing opener Afridi in the second over. Afridi miscued a lofted shot off Makhaya Ntini and was caught at mid-on.
Hameed was the next to go, failing to keep a drive off Shaun Pollock down and was held by a diving Gibbs at short mid-wicket.
Mohammad Yousuf, Pakistan's most successful batsman in the one-day series with scores of 53, 117 and 58, did not last long. He failed to beat Johan Botha's throw from the deep while returning for a second run.
It was then left to Younis and Malik to repair the early damage but when Younis departed it seemed the home team would not reach 200.
Kamran Akmal (29) and Abdul Rehman (31) gave impetus to the innings through a seventh-wicket stand that yielded 60 runs.
Rehman hit three boundaries while Akmal smashed two boundaries and a six to help Pakistan add 50 in the last five overs.
South Africa also brought left-handed batsman Jean-Paul Duminy into the side in place of Justin Kemp.
Pakistan boosted their bowling by including frontline paceman Mohammad Asif in place of Sohail Tanveer. Asif missed the first three matches due to an elbow injury.