A floodlight failure ended the final one-day international early and doomed Sri Lanka to a 5-0 series loss in South Africa on Saturday.
The technical fault at Newlands stopped the day-night game in its tracks and, after a delay of two hours, South Africa was declared the winner by 41 runs on the Duckworth-Lewis method.
The strange end secured a measure of revenge after Sri Lanka surprisingly won the test series 2-0.
South Africa was 135-2 and seemingly cruising to victory, chasing Sri Lanka’s 225 all out, when the lights went out after 28 overs. Aiden Markram was 67 not out and Rassie van der Dussen unbeaten on 28.
Earlier, leg-spinner Imran Tahir took 2-33 in his final home ODI for South Africa, but team-mate JP Duminy didn’t get to bat in his last home ODI.
Tahir and Duminy have said they will retire from 50-over internationals after the World Cup in England and Wales later this year.
Sri Lanka’s World Cup preparations are in trouble after it lost its eighth straight ODI.
Kusal Mendis made 56 but he was the only Sri Lankan to make a half-century. The tourists lost their last seven wickets for 100 runs, with fast bowler Kagiso Rabada returning 3-50.