Four half-centuries helped Sri Lanka to a total of 308 for six after they elected to bat first in the second one-day international against Afghanistan on Sunday.
After the openers fell cheaply, Kusal Mendis (61) and Sadeera Samarawickrama (52) steadied the innings, adding 103 runs for the third wicket.
Both batters benefited from dropped catches, but fell in the space of eight deliveries.
Samarawickrama hit one straight to mid-wicket, where Mohammad Nabi took the catch to make the breakthrough.
Mendis failed to clear a fielder at deep mid-wicket as he tried to take on Azmatullah Omarzai, who finished with three wickets.
Charith Asalanka and Janith Liyanage made a 111-run stand for the fifth wicket that came off in 98 deliveries.
Liyanage reached his second half-century in ODIs with a straight six off Noor Ahmad, but was dismissed the very next ball.
His half-century came off 48 deliveries with two fours and two sixes.
Asalanka brought up Sri Lanka's 300 with a boundary in the last over of the innings, and was unbeaten on 97 off 74 deliveries, including nine fours and two sixes.
Afghanistan were sloppy in the field, dropping as many as five catches.
Sri Lanka lead the three-match series 1-0. The third and final ODI will be played on Wednesday, also in Kandy.
The hosts won the tour's sole Test by 10 wickets. The current series will be followed by three T20 matches, all in Dambulla.