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.
Teams
Afghanistan: Mohammad Shahzad (wkt), Hazratullah Zazai, Rahmat Shah, Hashmatullah Shahidi, Mohammad Nabi, Gulbadin Naib (capt), Najibullah Zadran, Rashid Khan, Dawlat Zadran, Mujeeb Ur Rahman, Hamid Hassan
Sri Lanka: Dimuth Karunaratne (capt), Lahiru Thirimanne, Kusal Perera (wkt), Kusal Mendis, Angelo Mathews, Dhananjaya de Silva, Thisara Perera, Isuru Udana, Suranga Lakmal, Nuwan Pradeep, Lasith Malinga