Sri Lanka defended the revised target of 187 in the rain-interrupted game
Nuwan Pradeep and Lasith Malinga starred with the ball as Sri Lanka fought back to crush Afghanistan's hopes of a memorable World Cup victory on Tuesday.
Afghanistan, bidding for just their second win in a World Cup match and their first over a Test nation were in command halfway through a gloomy day in Cardiff after dismissing Sri Lanka for 201,.
But faced with a rain-revised target of 187 in 41 overs, their batting let them down again as they were bowled out for 152.
Victory saw Sri Lanka bounce back from a 10-wicket thrashing by New Zealand in their World Cup opener.
Pradeep took a career-best four for 31, while Malinga (three for 39) struck at both ends of the innings, finishing the match with a trademark yorker that bowled Hamid Hassan.
Afghanistan had slumped to 57 for five, with Thisara Perera holding a brilliant running catch in the deep to dismiss Hazratullah Zazai on the hook for 30.
Afghanistan captain Gulbadin Naib (23) and Najibullah Zadran (43) then started to turn the match again with a sixth-wicket stand of 64.
But paceman Pradeep struck twice, having Naib lbw before bowling Rashid Khan to leave Afghanistan 123 for seven.
And when Najibullah was run out by a direct hit from Sri Lanka captain Dimuth Karunaratne, Afghanistan were all but beaten at nine down.
Earlier, Sri Lanka came out of the blocks quickly against the unfancied Afghans, who suffered a seven-wicket loss to champions Australia in their tournament opener, and were set for an imposing total at 144 for one.
But they lost their last nine wickets for 57 runs, Mohammad Nabi taking three in five balls after Gulbadin won the toss.
Shell-shocked Sri Lanka kept on losing wickets at regular intervals, with 35 extras the second-highest scorer of the innings behind Kusal Perera's 78.
A dramatic 22nd over saw Nabi bowled Lahiru Thirimanne for 25 before having Kusal Mendis caught by Rahmat Shah in the slips for two.
Angelo Mathews was next to go, for a duck, also caught by Shah.
Leg-spinner Rashid Khan eventually got in on the act when he had opener Kusal Perera, who had seen wickets tumble at the other end, caught behind.
Rain then intervened, forcing the players from the field, with Sri Lanka 182-8.
The delay meant the match was reduced to 41 overs a side but Sri Lanka folded quickly after the resumption, losing Malinga and Pradeep for the addition of just 19 more runs.
Afghanistan, playing in only their second World Cup, beat Sri Lanka soundly in last year's Asia Cup in the United Arab Emirates, but for the second match in a row this World Cup their batting let them down.
D. Karunaratne c Najibullah b Nabi 30 (45)
K. Perera c Shahzad b Rashid 78 (81)
L. Thirimanne b Nabi 25 (34)
K. Mendis c Rahmat b Nabi 2 (2)
A. Mathews c Rahmat b Nabi 0 (2)
D. de Silva c Shahzad b Hamid 0 (4)
T. Perera run out (Hashmatullah/Shahzad) 2 (4)
I. Udana b Dawlat 10 (21)
S. Lakmal not out 15 (13)
L. Malinga b Dawlat 4 (14)
N. Pradeep b Rashid 0 (4)
Extras (lb10, nb3, w22) 35
Total (all out, 36.5 overs) 201
Fall of wickets: 1-92 (Karunaratne), 2-144 (Thirimanne), 3-146 (Mendis), 4-146 (Mathews), 5-149 (De Silva), 6-159 (Perera), 7-178 (Udana), 8-180 (Perera), 9-199 (Malinga), 10-201 (Pradeep)
Bowling: Dawlat 6-0-34-2 (3w); Hamid 7-0-53-1 (2w); Mujeeb 3-0-19-0 (1w); Nabi 9-0-30-4 (1w); Gulbadin 4-0-38-0 (3nb, 2w); Rashid 7.5-1-17-2 (1w)
Afghanistan (revised target 187 in 41 overs)
Mohammad Shahzad c Karunratne b Malinga 7
Hazratullah Zazai c Perera b Pradeep 30
Rahmat Shah c Mathews b Udana 2
Hashmatullah Shahidi c Perera b Pradeep 4
Mohammad Nabi b Perera 11
Gulbadin Naib lbw b Pradeep 23
Najibullah Zadran run out (Karunaratne) 43
Rashid Khan b Pradeep 2
Dawlat Zadran b Malinga 6
Hamid Hassan b Malinga 6
Mujeeb Ur Rahman not out 1
Extras (b1, nb1, w15) 17
Total (all out, 32.4 overs) 152
Fall of wickets: 1-34 (Shahzad), 2-42 (Rahmat), 3-44 (Hazratullah), 4-57 (Hashmatullah), 5-57 (Nabi), 6-121 (Gulbadin), 7-123 (Rashid), 8-136 (Dawlat), 9-145 (Najibullah), 10-152 (Hamid)
Bowling: Malinga 6.4-0-39-3 (3w); Lakmal 6-0-27-0 (2w); Udana 6-0-28-1 (1nb); Pradeep 9-1-31-4 (4w); Perera 4-0-19-1 (2w), De Silva 1-0-7-0
Result: Sri Lanka won by 34 runs (D/L method)
Umpires: Paul Wilson (AUS), Nigel Llong (ENG)
TV umpire: Rod Tucker (AUS)
Match referee: Andy Pycroft (ZIM)