Sri Lanka survived a scare in their World Cup clash against Afghanistan as they defeated the minnows by four wickets thanks to a century from Mahela Jayawardene.
Afghanistan set a competitive total for Angelo Mathews's side to chase as they posted 232 in their 50 overs, with Asghar Stanikzai top scoring with an innings of 54.
The Lions' reply got off to the worst possible start when Lahiru Thirimanne was dismissed with the first ball of the innings as he fell lbw to Dawlat Zadran.
Matters got worse when Tillakaratne Dilshan departed in the next over for a golden duck, while Kumar Sangakkara reached only seven before he was bowled by Hamid Hassan to leave his side in trouble at 18-3.
Jayawardene and Dimuth Karunaratne steadied the innings and guided their side past the 50-run mark, but more trouble lay ahead as Karunaratne became Hassan's second victim when he was caught for 23.
The experience of Jayawardene proved to be crucial as he reached his half-century off 67 balls to put the minnows on the back foot, and he managed to forge a strong partnership with Mathews to help his team past 100 runs.
The duo began to chase down the target as they quickly surpassed 150, reaching their century partnership at the crease in just 144 balls as Afghanistan began to feel the pressure.
Skipper Mohammad Nabi gave his side hope when he ran out his opposite number for 44, but Jayawardene reached his century in the next over, the 19th of his one-day international career.
Hassan returned to dismiss the 37-year-old to give Afghanistan a great chance of recording a major upset in Dunedin.
However, Thisara Perera showed his nerve at the end of the innings to wrestle control of the match away from Nabi's men with a series of boundaries, securing the match for his side with a knock of 46 not out from 26 balls.