Faf du Plessis and Hashim Amla struck unbeaten half-centuries as South Africa cruised to a nine-wicket victory at the Riverside Ground on Friday to put a major dent in Sri Lanka's hopes of reaching the Cricket World Cup semi-finals. After putting Sri Lanka in to bat, South Africa were set a target of 204 as seamer Dwaine Pretorius took 3-25 off 10 overs in an innings that was interrupted by a swarm of bees that invaded the pitch and sent the players and umpires to the floor. After the early loss of Quinton de Kock, already-eliminated South Africa never looked troubled as Amla (80 not out) and Du Plessis (96 not out) put on 175 for the second wicket, reaching their target with 76 balls remaining. Sri Lanka needed victory to move level with fourth-placed England in the race for semi-final places, but struggled with bat and ball against an opponent who have now beaten them in 17 of their last 19 meetings. "It's been a long time coming," South Africa captain Du Plessis said of his side's second win of the tournament. "We finally did ourselves justice with the talent we have in the dressing room. But it feels bittersweet, it doesn't feel like it means so much because it has come too late. "We showed the basics of batting, we have not had guys score big runs and build partnerships by going all the way through the innings. It made a huge difference today." Sri Lanka produced a fast start to their innings that was halted by the immaculate line and length of Pretorius as South Africa limited their opponents to 203 all out three balls shy of 50 overs. After overcoming the loss of captain Dimuth Karunaratne with the first ball of the match, Kusal Perera (30) and Avishka Fernando (30) raced to 67 inside the first 10 overs, taking the attack to the South Africans. But Pretorius picked up both their wickets and slowed the run-rate, with seamer Chris Morris (3-46) also collecting key scalps, including that of Angelo Mathews (11). De Kock (15) struck three crisp fours before he was bowled by the wily Lasith Malinga (1-47), but Amla and Du Plessis played a patient game and nudged the ball for singles and twos. Amla took 56 balls for his half-century and Du Plessis 70, but they were always ahead of the run-rate. They sped up when the target narrowed to under 30, but Du Plessis ran out of runs to reach a deserved captain's ton. "All departments went wrong, especially the batting," a rueful Karunaratne said. "We struggled to even get singles and that was key. You get put under pressure and start going for big shots. The wicket was a bit slow but they bowled really well. We could not build the same pressure." Sri Lanka must win their final two games and hope other results go their way if they are to reach the semi-finals. "We have to win our matches against West Indies and India. We will keep our heads up and keep going. It is the only thing we can do." — Reuters Scoreboard Sri Lanka D. Karunaratne c Du Plessis b Rabada 0 Kusal Perera b Pretorius 30 Avishka Fernando c Du Plessis b Pretorius 30 Kusal Mendis c Morris b Pretorius 23 Angelo Mathews b Morris 11 Dhananjaya de Silva b Duminy 24 Jeevan Mendis c Pretorius b Morris 18 Thisara Perera c Rabada b Phehlukwayo 21 Isuru Udana c&b Rabada 17 Suranga Lakmal not out 5 Lasith Malinga c Du Plessis b Morris 4 Extras (lb3, b4, w13) 20 Total (all out, 50 overs) 203 Fall of wickets: 1-0 (Karunaratne), 2-67 (Fernando, 3-72 (Kusal Perera), 4-100 (Mathews), 5-111 (Kusal Mendis), 6-135 (De Silva), 7-163 (Jeevan Mendis, 8-184 (Thisara Perera), 9-197 (Udana), 10-203 (Malinga) Bowling: Rabada 10-2-36-2 (2w); Morris 9.3-0-46-3 (3w); Pretorius 10-2-25-3 (1w); Phehlukwayo 8-0-38-1 (2w); Tahir 10-0-36-0; Duminy 2-0-15-1 (1w). South Africa Q. de Kock b Malinga 15 Hashim Amla not out 80 Faf du Plessis not out 96 Extras (0b 1lb 14w) 15 Total (for one wkt, 37.2 overs) 206 Fall of Wickets : 1-31 (de Kock) Did Not Bat : van der Dussen, Markram, Duminy, Pretorius, Phehlukwayo, Morris, Rabada, Tahir Bowling: Malinga 10-1-47-1; D. de Silva 4-0-18-0; Lakmal 6-0-47-0; T. Perera 5.2-1-28-0; J. Mendis 7-0-36-0; Udana 5-0-29-0.