Hasan Ali's maiden ten-wicket haul overshadowed Aiden Markram's gritty century to help Pakistan register their first Test series win over South Africa since 2003.
Hasan followed up his fantastic bowling performance in the first innings by recording five wickets for the second time in the match to dismantle South Africa's resistance on the final day of the Rawalpindi Test.
His new-ball partner Shaheen Afridi also struck gold in the post-lunch session on Monday and took four wickets to cap off a commanding bowling display.
In the end, Yasir Shah dismissed Wiaan Mulder to condemn the tourists to a 95-run loss, concluding a spectacular collapse for the Proteas as they slipped from 241/3 to 274 all out.
Opener Markram and middle-order batsman Temba Bavuma stitched a fighting 106-run stand for the fourth wicket to give Pakistan a mighty scare at one stage.
Facing questions over his timid record in the subcontinent, Markram braved through the challenging conditions in style to smash a well-deserved hundred.
He got to the triple-figure mark for the first time in 26 Test innings by taking a single off the last ball before lunch as South Africa confidently went to the break needing 151 runs for an unlikely win.
But Hasan shone brightly with the second new ball and scythed through the opposition's brittle batting line-up to stymie their optimistic victory bid.
Hasan immediately found the breakthrough with the second over of the new ball by getting Markram to loosely play at an out-swinger.
Markram was sharply caught in the slips by Imran Butt, who pulled off another impressive grab on the very next ball when Quinton de Kock launched a zealous drive on his first delivery.
Hasan's double-strike was followed by Shaheen bagging the scalp of Bavuma for a vigilant 61. The short-statured batsman was troubled by Shaheen's new-ball burst and limply poked at the wicket delivery directed in the proverbial corridor of uncertainty.
Later, George Linde fell victim to Hasan handing him his third five-wicket haul as he improved upon his previous best match figures of 7/83 against New Zealand in 2018.
The two teams resumed the intense battle for supremacy in the morning with South Africa on 127/1 profiting from a steady partnership between Rassie van der Dussen and Markram.
Van der Dussen was bowled by a peach of a delivery from Hasan on the third ball of the day as he was bamboozled by a massive in-ducker.
Faf du Plessis' nightmare run in the series was prolonged by Hasan as he trapped him leg-before soon after.
The paceman's sparkling comeback to the Test arena saw him fittingly pick the man of the match prize while Mohammad Rizwan - centurion in the second innings - was declared player of the series.
The series sweep, coming in Babar Azam's maiden stint as Pakistan's Test captain, has enabled the hosts to climb up the rankings and clinch the No. 5 spot. Meanwhile, the rudderless South African team has been pushed down to the sixth position.