Kumar Sangakkara's century led Sri Lanka to a thrilling two-wicket win over South Africa with a ball to spare in the fifth and final one-day international in Johannesburg.
At 3-1 down, Sri Lanka appeared poised for another defeat after centuries from Graeme Smith (125) and AB de Villiers (125 not out), who added 186 in 28 overs for the third wicket, led the Proteas to 312-4.
But Sangakkara (102) and Lahiru Thirimanne (69) put on 100 together and, when both fell late on, Sachithra Senanayake smashed a six to seal a breathless win.
It was tough on de Villiers and, in particular, Smith, who hit his first ton since September 2009 to ease the pressure after some had been calling for him to be dropped.
After Alviro Petersen and Francois du Plessis fell cheaply, the pair were content to accumulate steadily until de Villiers hit Dilshan for six to signal a change of approach.
Having played the anchor role in reaching his century off 129 balls, Smith then freed his arms to take two maximums off one Senanayake over.
Smith picked out the leaping Dinesh Chandimal at mid-wicket off the returning Lasith Malinga, but de Villiers passed 100 with a huge six before then manufacturing a couple more maximums in a huge final over.
Sri Lanka, who are reportedly set to replace coach Geoff Marsh with Graham Ford, got their chase off to a positive start with Upul Tharanga, rather than Tillakaratne Dilshan, the aggressor.
He was unbeaten on 34 out of Sri Lanka's 57 without loss when rain came in the eighth over, forcing a break of around an hour.
But, thankfully, no overs were lost, and Tharanga (46) continued where he left off when play resumed, claiming three more boundaries before perishing going for a fourth which would have taken him through to his half-century.
He was unlucky though as his sliced drive went over JP Duminy, who turned and ran towards the boundary before diving forward to take a sensational catch as the ball dropped over his shoulder.
Dilshan (41) and Chandimal then fell, but Thirimanne and Sangakkara worked the ball around to good effect, adding a century stand with little fuss.
Sangakkara brought up his century off only 96 balls by glancing Albie Morkel for four before he holed out to Duminy two deliveries later.
Thirimanne reached his maiden ODI half-century moments later but Angelo Mathews, Thisara Perera and Nuwan Kulasekara came and went without offering support as the game turned in South Africa's favour.
When Thirimanne fell off the third ball of the last over, Robin Peterson's second wicket in three deliveries, it seemed to be all over, but Senanayake heaved a huge six off the penultimate ball - astonishingly his first runs in 50-over international cricket - to provide a thrilling final twist.