Dale Steyn returned his best one-day bowling figures while opener Quinton de Kock hit a maiden hundred as South Africa beat Pakistan by 28 runs in the fourth day-night international in Abu Dhabi on Friday.
Steyn (5-25) derailed Pakistan in the 47th over with the wickets of Umar Akmal (22), captain Misbah-ul Haq (65) and Saeed Ajmal (0) to wreck the opposition from 228-5 to 238 all out in 49.2 overs.
South Africa's win gave them an unassailable 3-1 lead in the five-match series ahead of the fifth and final match in Sharjah on Monday.
South Africa won the first match by one run in Sharjah and third in Abu Dhabi by 68 runs while Pakistan claimed the second match in Dubai by 66 runs.
With Misbah and Umar at the crease, and with 41 needed in five overs, Pakistan looked set to level the series but Steyn improved on his previous best of 5-50 against India at Nagpur in 2011 to help South Africa snatch an unexpected win, like they did in the first match.
Misbah, along with debutant Sohaib Maqsood (56), put Pakistan in charge but Steyn removed Maqsood in the 37th over to give his team a sniff of the victory.
When Misbah holed out, after hitting four boundaries and a six off 76 balls, Pakistan's hopes were suddenly dashed.
“I am very happy and proud of the boys with this series win away from home, especially after a really bad show in Sri Lanka,” said South Africa captain AB de Villiers whose team lost their last series 4-1 in Sri Lanka in July.
“Quinton is a serious talent for the future in South Africa. Nice to have Steyn in the team, he has that killer instinct.”Misbah said Steyn's devastating over had changed the game.
“We were in a good position until the last five overs. We had two set batsmen and the equation was 30 balls, 41 runs which was gettable but Steyn's over put pressure on us,” said Misbah.
Pakistan had raced to 74 without loss in a cautious start before they lost three wickets in the space of 12 runs.
In the 19th over, Ahmed Shehzad was run out for 43 as he failed to reach the striker's end after Mohammad Hafeez went for a sharp single. He hit five boundaries and a six off 59 balls.
It became 85-2 when leg-spinner Imran Tahir bowled Hafeez (33) and a run later Asad Shafiq miscued a drive and was caught off paceman Lonwabo Tsotsobe for just one.
Misbah and Maqsood went on the attack, with the debutant hitting two huge sixes off Tahir.
Maqsood, likened to former Pakistan batting master Inzamam-ul Haq, reached his half-century with a superb flick off paceman Morne Morkel for his fifth boundary. In all he hit six boundaries and two sixes off 54 balls.
But he played one shot too many and was smartly caught at deep mid-off by AB de Villiers off Steyn who also had Sohail Tanvir for one.
Quinton de Kock anchored the South African innings. The 20-year-old left-hander made the most of a dropped catch at slip by Hafeez off Tanvir when he had made only two.
He went on to make a 135-ball 112 to bolster the South African innings who had won the toss and batted.
De Kock lifted lanky paceman Mohammad Irfan over long-on for a big six to reach the three-figure mark off 127 balls, anchoring the innings with a 87-run opening stand with Hashim Amla (46) and another 69 for the third wicket with skipper De Villiers who made a 40-ball 30.
In all, De Kock hit nine boundaries and a six during his attractive knock before he and De Villiers fell in succession to paceman Junaid Khan who finished with 2-42.
Ryan McLaren (28) and Jean-Paul Duminy (25) added a quickfire 52 for the unbroken sixth wicket stand, hitting two sixes off Saeed Ajmal's 49th over.