South Africa 367 for 5 (du Plessis 185, Pathirana 2-55) beat Sri Lanka 327 (Tharanga 119, Dickwella 58, Weerakkody 58, Parnell 4-58) by 40 runs
Scorecard and ball-by-ball details
A Sri Lankan line-up that was dismissed for under 190 in the first three ODIs and had not topped 300 in any format on the current tour of South Africa made a fist of chasing a record total at Newlands, but eventually fell 40 runs short. South Africa's batsmen filled the boots by posting the highest total at the ground, overtaking the 354 for 3 they put on against Kenya in 2001. It proved enough to extend their winning streak at home to 13 matches and put them one win away from the No.1 ODI rankings.
Quinton de Kock scored his first fifty of the series, AB de Villiers his 50th ODI fifty, but Faf du Plessis stole the show. His second century of the series also made him the holder of the second-highest individual score by a South African, surpassing de Kock's unbeaten 178 against Australia in September 2016 and three runs short of Gary Kirsten's 188* against the UAE at the 1996 World Cup.
Sri Lanka's reply started strongly as Upul Tharanga and Niroshan Dickwella plundered 100 runs off the first ten overs. Tharanga went on to score the first century by a Sri Lankan batsman on this trip but was dismissed in the 30th over. It left Sri Lanka with a tough task of having to sustain that momentum.
Sandun Weerakkody, playing in just his second ODI, ensured that by bringing up a maiden half-century to keep Sri Lanka within range,and even put them ahead of South Africa's score at times. After 45 overs, Sri Lanka were 317 for 7. In comparison, South Africa had only reached 317 at the end of 46 overs. But as is so often the case for South Africa, Imran Tahir came up with crucial incisions.
He took two wickets in his final over - trapping Nuwan Kulasekara lbw and having Weerakkody caught at backward point - to leave Sri Lanka needing 51 off the last four overs with just one wicket standing. They didn't get there, but neither have 22 other chasing teams in day-night matches at Newlands. Sri Lanka, however, put on the most runs among all sides that have attempted a successful chase.
South Africa knew the advantages that could be gained from setting a target and chose to do that on a flat deck. Hashim Amla was dismissed early but that only gave du Plessis enough time to settle in and build an innings. He shared a century stand with de Kock by the time Sri Lanka could have their first drink. De Kock brought up fifty off 40 balls and was threatening more but added five more before he edged Sachith Pathirana to Tharanga at slip.
If Sri Lanka thought that would slow South Africa down, they were wrong. De Kock and du Plessis had motored on at a rate of 6.89; de Villiers picked up exactly where they left off and put on 137 runs with du Plessis at 6.90. Their contributions were almost mirror images of each other - du Plessis scored 70 runs in their stand; de Villiers 64. Du Plessis' fifty came off 46 balls with a drive off a half-volley. De Villiers reached his fifty off 51 balls, the delivery before du Plessis dug out a Kumara yorker to get to a hundred. De Villiers only added another 14 runs before being bowled around his legs; du Plessis did not give them any such let-off.
As his innings went on, he batted more aggressively. His first fifty came off 46 balls, his second off 43 and his third off 40 as he brought out everything from a straight drive back over the bowler's head to a scoop over fine leg, once in the same over.
Farhaan Behardien was not simply a passive observer. He scored almost half the runs (31) in a 74-run stand but was happy to hand strike back to du Plessis as he went in search of the record. Du Plessis wanted it and hit Nuwan Kulasekara for six in the penultimate over to overtake de Kock and then tried to repeat the feat with four balls to go. Du Plessis did not get enough power behind his shot and long-on took the catch to end his quest. For Sri Lanka, though, the damage seemed done.
Their batting throughout this trip has left much to be desired but with nothing to lose, they came out blazing. Tharanga and Dickwella, who had already scored two half-centuries on this tour, enjoyed the batting conditions as much as South Africa had. Wayne Parnell and Dwaine Pretorius opened the bowling, JP Duminy was given the ball when it was three overs old, Imran Tahir was called on in the powerplay and Tabraiz Shamsi was not used until the 14th over. By then, Sri Lanka had made their intent clear.
Pretorius made the first breakthrough in his second spell, when he had started to use the short ball more. Dickwella played early to a delivery that got big on him and he top-edged to Behardien at deep square leg to end a 139-run opening stand. Like du Plessis, Tharanga continued almost completely unaffected by a dismissal and brought up a 73-ball hundred.
At the halfway stage, Sri Lanka had scored more runs they had in this series so far - when their best performance was 186 - and had brought the required run-rate down to just under seven an over. Much rested on Tharanga though, especially when Kusal Mendis walked across his stumps and gloved a Parnell delivery to de Kock. Tharanga only managed two more shots in anger before he steered Parnell to backward point and Sri Lanka's challenge looked over.