A quick-fire 60 by Fakhar Zaman and Mohammad Nawaz's flourish (25*) towards the end helped Pakistan win the fourth and final T20I against host South Africa by three wickets and clinch the series 3-1 here on Friday.
Chasing 144, Pakistan reached the target with just a ball remaining after Nawaz pulled a chest-high ball from Lizaad Williams over the square-leg boundary for a six to signal visitors' victory.
Pakistan had also won the one-day international series 2-1.
Earlier, opting to bowl on another good pitch for batting after winning the toss, Pakistan bowlers Hasan Ali and Faheem Ashraf did the maximum damage, taking three wickets each, while Haris Rauf took two to bundle out South Africa in 19.3 overs.
It was Rauf who took out the dangerous Rassie van der Dussen for 52, when he sent a fuller delivery in the 14th over for the South African to hit straight to Mohammad Hafeez at mid-wicket.
A procession ensued following van der Dussen's dismissal, and none of the South African batsmen could even touch double-digit scores.
In response, Fakhar Zaman made a stroke-filled 34-ball 60 (5x4, 4x6) before the team suffered some quick dismissals, losing Babar Azam, Haider Ali, Mohammad Hafeez, Asif Ali and Faheem Ashraf cheaply.
Nawaz batted patiently, and with two balls remaining, he pulled Williams for a six to signal Pakistan's win. Faheem Ashraf was declared 'Man of the Match'.
Brief scores: South Africa 144 in 19.3 overs (Janneman Malan 33, Rassie van der Dussen 52; Faheem Ashraf 3/17, Hasan Ali 3/40) lost to Pakistan 149/7 in 19.5 overs (Fakhar Zaman 60, Mohammad Nawaz 25*; Sisanda Magala 2/33, Lizaad Williams 2/39) by three wickets.