Sri Lanka must chase down a target of 233 to beat Afghanistan in the World Cup after the 1996 champions took a late flurry of wickets in Dunedin.
The World Cup debutants, who lost to Bangladesh in their first game of the tournament, had looked to be on the back foot early on when they lost openers Javed Ahmadi and Nawroz Mangal inside the opening 10 overs.
Despite being restricted to 40-2 at one stage, Afghanistan were able to briefly rebuild with a partnership of 88 between Asghar Stanikzai (57) and Samiullah Shenwari (38) for the third wicket.
Stanikzai breezed past fifty, but his knock was brought to an end when he went for one shot too many and slogged Rangana Herath down the throat of Jeevan Mendis in the deep.
Once Shenwari was dismissed by Thisara Perera, Afghanistan's innings appeared to unravel as captain Mohammad Nabi and Najibullah Zadran both came and went.
Mirwais Ashraf provided hope for the Afghans with 28 off 32 deliveries, but Lasith Malinga (2-41) polished off the tail as Sri Lanka took the final six wickets for 63 runs.