Fakhar Zaman's match-winning century proved the difference as Pakistan defeated South African by 28 runs in the third ODI in Centurion to take the series 2-1.
Zaman's second ton (101 from 104 balls) in as many games propelled Pakistan to 320/7, which proved too high a mountain for the depleted Proteas to climb. South Africa were eventually all-out for 292.
Pakistan also had their skipper Babar Azam's 94 to lean on after being put in to bat by his contemporary Temba Bavuma, who won the earlier toss and chose to field.
SCORING | 3rd ODI: SA vs Pakistan
The Proteas began their chase with a run-a-ball 50 partnership between Janneman Malan and Aiden Markram, but Shaheen Afridi broke the promising stand by dismissing Markram caught behind.
Jon-Jon Smuts lasted for 17 runs before being undone by a Usman Qadir googly that also kept low and cannoned onto the stumps, leaving the Proteas on 77/2.
Malan remained stoic and got to his half-century, his second international score above 50 after scoring 129 not-out against Australia last year.
The 24-year-old dispatched anything short from the Pakistan pacemen and didn't look frazzled when the visiting skipper sent turners Qadir and Muhammad Nawaz to unsettle him.
However, Nawaz had his way with the Cape Cobras batsman, eventually dismissing Malan for 70 from 81 balls.
South Africa slipped into peril when Bavuma followed Malan three balls later, bowled by Nawaz for 20 (23 balls).
Nawaz's damage extended to Heinrich Klaasen, trapped LBW on 4 runs, with South Africa in a desperate situation at 140/5 after 27.3 overs.
The match was an opportunity for some of the B-list stars to show that they could carry the Proteas in Quinton de Kock, David Miller (IPL both on duty) and Rassie van der Dussen's (injured) absence.
Klaasen's third straight batting failure was particularly abject considering that two of three matches were played at his Centurion home ground and one was at a batting-friendly Wanderers, less than 40km south.
Kyle Verreynne joined Malan in showing a desire to make his stay in green permanent with a fighting knock of 62 from 53 balls. However, Smuts fell short of replicating his domestic reputation in the ODI game.
Verreynne and Andile Phehlukwayo's 108-run sixth-wicket partnership, SA's highest in the game, restored some respectability to the chase, although they were up against a climbing asking rate.
Both batters reached their 50's and upped the tempo with around eight overs remaining, and went after the Pakistani bowling with some lusty blows.
But Haris Rauf spoiled the party as he got Verreynne to mistime a slower ball to the boundary that landed in Qadir's hands instead of the intended grass bank.
When Pehlukwayo skied Hasan Ali to Sarfaraz Ahmed for a well-played 54 from 61 deliveries, it spelt tickets for the Proteas chase.
Earlier in the day, Zaman continued tormenting the Proteas this series with a coolly compiled century.
As if wound up by the controversial Wanderers run out during the Pink Day ODI last Sunday, where he scored 193 runs in defeat, Zaman put South Africa to the sword again.
The 30-year-old reached his sixth ODI century in 99 deliveries, hitting nine boundaries and three sixes in the process.
The Proteas had keenly felt the missing IPL quintet, especially front-line bowlers Kagiso Rabada, Lungi Ngidi and Anrich Nortje.
Their pace attack lacked bite and threat, barely troubling the Pakistan batsmen under the south Pretoria cloudy skies.