Pakistan denied South Africa a series sweep by winning the third and final T20 international at Centurion by 27 runs.
But South Africa could only muster 141-9 in response, with Rassie van der Dussen (41 off 35) and Chris Morris (55no off 29) - who hit a 28-ball maiden T20I fifty - the only batsmen to get going.
Mohammad Amir took three wickets for Pakistan, while Shadab Khan was also key, the all-rounder nailing three sixes off Andile Phehlukwayo in his side's final over before dismissing David Miller and Phehlukwayo.
Pakistan's Babar Azam (23 off 11) struck four fours off Junior Dala in the second over of the game but Pakistan then lost wickets at regular intervals as Mohammad Rizwan top-scored with 26.
Shadab (22no off 8) gave Pakistan momentum during 21-run final over and the tourists did not hand it back, reducing South Africa to 30-3 and 80-6, Shadab catching Miller off his own bowling and pinning Phehlukwayo lbw.
Morris thumped Faheem Ashraf for 21 runs in the 14th over to give the hosts hope but that was quickly quashed as Amir and Faheem took out the lower order.
Morris completed his fifty with a six off Shaheen Afridi from the penultimate ball of the match - one of eight boundaries he amassed - but his shake of the head showed he was in no mood to celebrate.
South Africa's next assignment is a home two-Test series against Sri Lanka - the first of which, at Kingsmead in Durban, gets underway live on Sky Sports Cricket from 7.55am on Wednesday, February 13.
Pakistan's players will focus on the Pakistan Super League, held between February 14 and March 17, before travelling to England in April ahead of five ODIs and a T20I against Eoin Morgan's men and the Cricket World Cup.