CHRISTCHURCH, New Zealand (AP) -- South Africa's Cricket World Cup warmup match against Sri Lanka was severely shortened by rain Monday but there was still time for both teams to send a warning to opponents before the tournament begins Saturday.
Sri Lanka made 279-7 in an impressive innings, shortened to 44.4 overs by rain, and South Africa's winning target was twice adjusted because of stoppages before it reached 188 in 24.3 overs to win by five wickets under the Duckworth Lewis system.
South Africa scraped home with three balls to spare. Quinton de Kock (66) and stand-in captain Hashim Amla (46) put on 116 for the first wicket, giving South Africa a platform and flexibility when rain intervened.
Rilee Rossouw (16 not out) and Vernon Philander (13 not out) were there at the end.
South Africa was without captain A.B. de Villiers, who was rested because of tightness in one hip, but still functioned efficiently under the leadership of Amla, reinforcing its reputation as one of the teams to beat at this year's tournament.
Sri Lanka will also have taken heart from a strong all-round performance. Veteran Tillakaratne Dilshan made 100 -- and was out next ball -- and Angelo Mathews made 58 as Sri Lanka built a substantial total as rain cut short its innings.
Dilshan reached his 100 from 82 balls while Mathews and Dimuth Karunaratne (46) kept the runs flowing later in the order.
South Africa used eight bowlers, the best of whom were Kyle Abbott who took 3-37 and Wayne Parnell who took 2-42.
The Proteas were then unperturbed by the rain delays which twice forced them to revise their victory target in a match played in bitterly cold conditions.
J.P. Duminy (17) and Faf du Plessis (19) both fell as South Africa approached its target but Rossouw and Philander, promoted in the order, kept their composure to guide their team home.
South Africa needed 18 runs from the last two overs and Philander hit a six from the penultimate ball of the 24th over -- which yielded 14 runs -- to leave the Proteas needing only four from the final over.
Lasith Malinga, regarded as the best death bowler in world cricket, returned to the Sri Lanka lineup Monday after a long break with an ankle injury. He was entrusted with the final over but couldn't prevent Philander and Rossouw knocking off those four runs in three balls.