Sri Lanka defeated Pakistan by 12 runs in the opening match of the 12th Asia Cup one-day cricket tournament on Tuesday.
Earlier Lahiru Thirimanne smashed his second one-day international century in Sri Lanka's healthy total of 296-6.
Left-handed Thirimanne orchestrated 102 off 110 balls with 11 fours and a six as he was elevated to open the innings for only the third time in his four-year career in the absence of the injured Tillakaratne Dilshan.
Thirimanne and Kumar Sangakkara, who scored 67, laid the foundation of a strong total by putting on a brisk 161 off 146 balls for the second wicket after captain Angelo Mathews won the toss.
Umar Gul got the early breakthrough when he had Kusal Perera (14) caught behind before Thirimanne and Sangakkara scored better than run-a-ball on a wicket tailor-made for batsmen.
Thirimanne completed his half century off 56 balls with most of his six boundaries scored on the offside. Sangakkara also raised his 50 off 50 balls by hitting a similar number of boundaries before Gul struck in his second spell.
Sangakkara looked well set for another big knock before he pulled Gul's short delivery straight to short mid-wicket to give Pakistan some reprieve.
Thirimanne completed his century by driving Gul through the covers for a single but soon after equaling his career-best 102 against Australia at Adelaide last year he attempted a loose drive off Saeed Ajmal and got his off stump knocked back.
Sri Lanka shuffled its batting order in order to get quick runs but Afridi got through the defenses of Mahela Jayawardene for 13 - playing his first ODI in over three months - and Thisara Perera, who holed out in the deep on 6.
Debutant Chaturanga de Silva was run out for 2 in a mix-up with Mathews as Pakistan hit back with four wickets in quick succession.
But Mathews (55 not out) and Dinesh Chandimal (19 not out) brought Sri Lanka close to 300 by adding 45 runs off 39 balls, with the captain reaching his unbeaten half century in the last over.
Gul got 2-38 while Afridi ended up with 2-56.
Host Bangladesh, which takes on India on Wednesday, and first-timer Afghanistan are the other teams in the biennial tournament.