Aiden Markram starred as South Africa beat Sri Lanka by 41 runs on the Duckworth-Lewis-Stern method to seal a 5-0 ODI series whitewash.
South Africa was cruising towards its target of 226 at Newlands on Saturday and was on 135-2 after 28 overs before a floodlight failure halted play.
Repairs were attempted for two hours before umpires called time on the match, giving the home side victory, with Markram's career-best unbeaten 67 proving decisive.
Promoted to opener in place of the omitted Reeza Hendricks, Markram was dropped twice and capitalised by hitting seven boundaries in a 75-ball knock.
Sri Lanka failed to pass 250 for the fifth time in the series. Any hopes of the tourist setting a competitive total were ended when Kusal Mendis was run out for 56.
Kagiso Rabada took 3-50 for South Africa, while Imran Tahir shone with 2-33 and snatched two catches. It was the last ODI on home soil for Tahir and JP Duminy, who will retire from the format after this year's World Cup.
Lasith Malinga had called for more application from his batsmen but, after winning the toss, saw openers Avishka Fernando (9) and Upul Tharanga (2) fall inside the first 25 deliveries.
Mendis attempted to anchor the innings by putting on 49 with Oshada Fernando (22) and 62 with Angelo Perera (31), only for Tahir to end both partnerships by drawing edges collected by home skipper Faf du Plessis at slip.
His patient fifty brought up in 72 balls, Mendis looked well set until a dreadful mix-up with Priyamal Perera ended his effort, a third run out in his last six innings.
The efforts of Priyamal Perera, who put on 33 before being caught and bowled by Rabada in the penultimate over, ensured Sri Lanka reached a defendable total, as did those of Isuru Udana (32 off 29 balls), who impressively followed up his 78 in Port Elizabeth.
Sri Lanka's innings was ended with three balls to spare but South Africa did not make a fluent start to its reply, with the in-form Quinton de Kock (6) falling to Malinga in the third over, while Udana dropped a caught and bowled opportunity to remove Markram two balls later.
Makram was dropped again - this time by Oshada Fernando - in the 10th over off Udana's bowling, but the 24-year-old took full advantage of those let-offs, putting on 70 with Du Plessis, who fell for 24 after edging Thisara Perera behind.
Markram's fifty arrived off 58 balls as he built another partnership, this time of 57, with number four Rassie van der Dussen (28no).
The failing lights denied Markram a chance for a ton in a bizarre end to the series. The first of three T20 internationals between the sides takes place in Cape Town on Tuesday.
Latest on Sportstar
- Duplantis sets new 2023 pole vault best
- Champion Napoli ends season with 2-0 win over bottom side Sampdoria
- Benzema scores on farewell but Real held at home by Bilbao
- RMA 1-1 ATH; La Liga Highlights: Benzema goal helps Real Madrid secure draw against Athletic Bilbao
- Saudi Arabia’s Al Ittihad to sign Benzema on two-year deal - Saudi state media