Nuwan Pradeep took a career-best 4-31 as Sri Lanka survived a remarkable batting collapse to beat Afghanistan by 34 runs (DLS) in a rain-hit World Cup contest.
Sri Lanka slumped from 144-1 to 201 all out with Mohammad Nabi (4-30) taking three wickets in an over for Afghanistan.
A lengthy rain delay meant Afghanistan were set a revised target of 187 to win and Pradeep took two early wickets to help reduce them to 57-5 and then returned to break a 64-run stand for the sixth wicket between Gulbadin Naib (23) and Najibullah Zadran (43) as Sri Lanka pushed for victory.
Lasith Malinga (3-39) wrapped it up with a trademark yorker to bowl Hamid Hassan and leave Afghanistan 152 all out.
Having been put in to bat, Sri Lanka made a blistering start with Kusal Perera taking the attack to Afghanistan's bowlers with Dimuth Karunaratne and then Lahiru Thirimanne providing valuable support.
However, the game changed in the 22nd over when Nabi, having already removed Karunaratne (30), bowled Thirimanne (25) and then proceeded to have Kusal Mendis (2) and Angelo Mathews (0) caught at slip in the space of five balls.
With Sri Lanka still reeling, Hamid had Dhananjaya de Silva (0) caught behind and some excellent fielding from Hashmatullah Shahidi saw Thisara Perera (0) run out.
When the rain came Sri Lanka were eight down, Kusal Perera, having helplessly watched the wickets fall at the other end, finally dismissed by Rashid Khan for 78.
After a delay of more than two hours, play resumed with the game reduced to 41 overs per side and Afghanistan swiftly brought the Sri Lanka innings to a close, Rashid Khan (2-17) bowling Pradeep to finish things off in the 37th over.
Malinga bowled a superb first over to show Afghanistan just how tough the chase would be and after a brief flurry from Hazratullah Zazai, the veteran seamer had Mohammad Shahzad (7) caught at midwicket with a slower ball.
Rahmat Shah (2) then nicked Isuru Udana to slip and Hazratullah (30) fell to a brilliant diving catch in the deep from Thisara Perera to give Pradeep his first scalp.
Hashmatullah soon followed and when Nabi (11) was bowled by Thisara Perera, Sri Lanka were in complete control.
Gulbadin and Najibullah gave Afghanistan hope with a half-century partnership but when Pradeep returned and trapped Gulbadin lbw and then bowled Rashid Khan (2), Sri Lanka were on the brink.
The end came quickly with Malinga rolling back the years with a pair of scorching inswinging yorkers to finish the job, either side of Najibullah's run out.
You can watch every match of the 2019 ICC Cricket World Cup on Sky Sports Cricket, continuing with South Africa vs India, from 10am on Wednesday.