Fazalhaq Farooqi marked his return to the Afghanistan side with four wickets as Sri Lanka were dismissed for just 241 in a World Cup match in Pune on Monday.
Left-arm quick Farooqi finished with an impressive 4-34 in 10 overs, having been recalled in place of teenage leg-spinner Noor Ahmad who had taken three wickets in the win against Pakistan last time out.
Farooqi took wickets throughout the innings, while off-spinner Mujeeb Ur Rahman kept things tight with 2-38 in 10.
Sri Lanka opener Pathum Nissanka made 46 but no other batsman managed more than skipper Kusal Mendis' (39).
Afghanistan, bidding for a third victory over a World Cup winner at this edition having already defeated holders England and 1992 champions Pakistan, saw captain Hashmatullah Shahidi win the toss.
Farooqi was soon into the action when he had Dimuth Karunaratne lbw on review for 15.
Nissanka, fresh from his unbeaten 77 in an eight-wicket rout of England, was in sight of his fifth fifty in six innings this World Cup.
But he was caught behind for 46, trying to cut paceman Azmatullah Omarzai, to end a 60-ball stay including five fours.
Nissanka's exit ended a stand of 62 with Sri Lanka now 84-2 in the 19th over.
Mujeeb then struck in successive overs to leave 1996 World Cup champions Sri Lanka four wickets down.
Mendis gave his wicket away by sweeping Mujeeb straight to deep square leg, having taken 50 balls over his 39.
Sri Lanka's 134-3 soon became 139-4 when Mujeeb had Sadeera Samarawickrama plumb lbw for 36.
Star leg-spinner Rashid Khan then marked his 100th one-day international by clean bowling Dhananjaya de Silva with a superb googly that completely deceived the batsman.
Tailender Maheesh Theekshana made a useful 29 before he was expertly yorked by Farooqi, who had Angelo Mathews well caught in the deep by Afghanistan veteran Mohammad Nabi for 23.
Afghanistan and Sri Lanka are both still in semi-final contention after each winning two of their opening five matches.
Brief scores: Sri Lanka 241 in 49.3 overs overs (P Nissanka 46; Fazalhaq Farooqi 4-34) v Afghanistan
jdg/dj