Fakhar Zaman's second hundred in as many games set Pakistan on their way to a series-clinching 28-run win over South Africa in the third one-day international at Centurion.
The left-handed opener followed up his valiant 193 in the second match with a composed 101 at SuperSport Park, captain Babar Azam thumped 94 from 82 balls and some brutal hitting from Hasan Ali (32no from 11 balls) late on helped Pakistan to post 320-7 from their 50 overs.
South Africa slumped to 128-4 in reply as Janneman Malan (70) and Temba Bavuma (20) fell in the same Mohammad Nawaz over before a sixth-wicket stand of 108 between Kyle Verreynne (62 from 53 balls) and Andile Phehlukwayo (54) revived the chase.
However, the required rate remained challenging and when the pair were dismissed in consecutive overs, the Proteas hopes quickly faded and they were bowled out for 292 in the last over of the match.
Having been asked to bat first, Pakistan got off to a bright start against a South Africa side shorn of its five IPL-bound stars as Imam-ul-Haq and Fakhar calmly compiled a 112-run opening partnership before the former perished trying to hit Keshav Maharaj over long on and picked out Verreynne in the deep.
It did little to slow Pakistan's progress though and Babar joined Fakhar and the duo began to up the tempo. The had added 94 in a little over 14 overs when Fakhar, having just gone to a 99-ball century - his fifth ODI ton - edged an attempted paddle-sweep onto his pad and was caught behind to give Maharaj (3-45) his second wicket.
The South Africa left-arm spinner then had Mohammad Rizwan (2) stumped as the hosts clawed their way back. The fightback continued as the Proteas' spinners came to the fore; Jon-Jon Smuts (1-67) removed Sarfaraz Ahmed (13) and Aiden Markram (2-48) accounted for Faheem Ashraf (1) and Nawaz (4) as the Pakistan innings threatened to peter out.
Babar was still there but it was Hasan who really gave the tourists a boost, smashing Smuts for four sixes, including three in a row to end the 49th over. The skipper added a further two sixes in the last before, needing six to reach his hundred, he was caught on the boundary trying for a third.
The South Africa reply began well with the openers putting on 54 in good time before Shaheen Afridi had Markram (18) caught behind via an inside edge following a review.
A moment of magic from leg-spinner Usman Qadir did for Smuts, who played back to what looked like a drag-down, only to see the flipper hurry through to peg back his middle stump.
Malan was going well though and brought up his half-century from 63 balls in a 50-run stand with captain Temba Bavuma, only for the game to swing hugely in Pakistan's favour in the 24th over when Nawaz trapped Malan plumb lbw before bowling Bavuma, who appeared to be struggling with an injury, three balls later.
When Nawaz added the wicket of Heinrich Klaasen (4) a couple of overs later, South Africa were 140-5 and the game looked to be up for the home side, even as the stand between Verreynne and Phehlukwayo built.
As it continued to grow, both batsmen passed 50 and the runs required dipped below 100 though, it briefly seemed as though the chase was on.
But with the required rate staying firmly between 10 and 11-an-over, there was no margin for error and when Verreynne mistimed Haris Rauf's slower ball and was caught at deep backward square, it was Pakistan's game once more.
Phehlukwayo skied a pull shot off Hasan in the next over and was remarkably caught behind as Sarfaraz sprinted to take the catch halfway to the boundary at square leg and it was left to Rauf and Shaheen to mop up the tail to clinch a 2-1 series win for Pakistan.
Watch the first T20I between South Africa and Pakistan from 1.25pm, Saturday on Sky Sports Mix.