South Africa clinched a thrilling 33-run win against India at the Centurion to win the five-match series 3-2.
Yusuf Pathan bludgeoned a whirlwind century for India but it was not enough as they slumped to a 33-run Duckworth/Lewis defeat and a 3-2 one-day series loss to South Africa in Pretoria.
The big-hitting all-rounder smashed 105 from 70 balls after his side had slumped to 119 for eight in pursuit of a revised 268 victory target.
They looked out of the game when he walked to the crease thanks to some ruthless bowling from Morne Morkel, who picked up four wickets for 52, and Dale Steyn (two for 32) aided by some poor shot-making from the tourists.
But a century stand with Zaheer Khan (24) raised hope, before the wicket of Pathan killed off the tourists.
Earlier, Hashim Amla carried his bat in an unbeaten 116 to see the hosts reach 250 for nine in 46 overs.
With rain still in the air when India's chase got under way, the openers came out in attacking mode, but were jolted when Lonwabo Tsotsobe bowled Rohit Sharma (five) via an inside edge onto the stumps.
Virat Kohli (two), Mahendra Singh Dhoni (five), Parthiv Patel (38), Yuvraj Singh (eight) and Suresh Raina (11) all fell quickly, leaving India on 74 for six inside 14 overs.
Harbhajan Singh (13) stopped the freefall by lasting more than five overs before he fell to Johan Botha.
But Pathan then found some good support in Zaheer, who could have been out when he had just come in and his partner was still on 41 after Morkel had him caught off a no-ball.
They came together at 119 for eight, and after Pathan reached 50 in 47 balls, it took him only 21 more deliveries to reach his ton.
His innings, which included eight fours and eight sixes, was eventually ended with a top-edge off Morkel that was caught by Faf du Plessis inside the circle.
Fifty runs were still required from 64 balls, but by then too many wickets had fallen and Zaheer was last man out, handing the hosts the series.
At the start, India decided to go into the game with an extra spinner - Piyush Chawla included ahead of Ashish Nehra - while the South Africans were unchanged.
The tourists made a bold move after winning the toss with Dhoni electing to field under the cloud cover hovering around Centurion.
His decision looked a good one first up with Zaheer sending Graeme Smith (seven) on his way in the third over when the left-hander hung his bat out and edged behind to Pathan at first slip.
But Morne van Wyk, one of the form players from the domestic season, and Amla got together and shared in a 97-run partnership to put their side back on top.
The former passed his 50 from 53 balls along the way, but was then excellently caught one-handed by Yuvraj (two for 45) off his own bowling with the score on 113.
The part-timer accounted for AB de Villiers (11) four overs later - the wicketkeeper stumped for a second successive game - before Amla was handed a lifeline on 70 after substitute Ravichandran Ashwin, fielding at square leg, seemed to spot a pull shot late and fluffed a chance off Sharma.
Amla reached his century from 113 balls, but rain then halted play for more than an hour with South Africa in the ascendancy after 42 overs played.
With the revised playing conditions in effect after the resumption, JP Duminy (35), who shared a 101-run stand with Amla, fell quickly.
Munaf Patel grabbed three for 50 in a late-order collapse when just 24 were added for the loss of six wickets as the home sided ended on 250 for nine