COLOMBO: Shahid Afridi and Anwar Ali played key roles as Pakistan ended a successful tour of Sri Lanka with a thrilling one-wicket victory in the second Twenty20 international in Colombo on Saturday.

Pakistan recovered from 40-5 in the eighth over to surpass Sri Lanka's challenging 172-7 with four balls to spare with Imad Wasim striking the winning six off left-arm seamer Binura Fernando.

Skipper Afridi led the way with a 22-ball 45 that included four sixes and a boundary, before Anwar smashed 46 off 17 balls in a match-winning knock that contained four sixes and three fours.

Imad, who remained unbeaten on 24, helped Anwar add 58 for the eighth wicket as the tourists recorded a heart-stopping win in front of a sell-out crowd of 35,000 at the Premadasa stadium that briefly included Sri Lanka President Maithripala Sirisena.

Pakistan v Sri Lanka 2nd T20 - As it happened

Pakistan, who won the first T20 match by 29 runs on Thursday, completed a remarkable treble on the six-week tour, having earlier won the Test series 2-1 and the one-dayers 3-2.

Fernando, a lean 20-year-old playing only his second international match, gave Sri Lanka a flying start with a double strike in his second over.

He bowled Ahmed Shehzad with a slower delivery and then forced Mukhtar Ahmed to top-edge a bouncer to Chamara Kapugedera at mid-wicket.

Pakistan's top order caved in as Mohammad Hafeez and Umar Akmal were run out and senior batsman Shoaib Malik was stumped.

Afridi began the amazing turnaround with a sixth-wicket stand of 61 with Mohammad Rizwan (17) as the inexperienced Sri Lankan attaack wilted under pressure.

Earlier, aggressive batting by debutant Shehan Jayasuriya and the recalled Kapugedera lifted Sri Lanka to 172-7 after skipper Lasith Malinga won the toss and elected to bat in the day-night match.

Jayasuriya, a 23-year-old left-hander unrelated to Sri Lanka's former captain Sanath Jayasuriya, smashed three fours and two sixes in his 32-ball 40 before he was fifth out.

But it was Kapugedera who boosted the total with an unbeaten 48 off 25 balls that contained four sixes and two boundaries.

Kapugedera put on 55 for the sixth wicket with Milinda Siriwardana (23) as the hosts plundered 59 runs in the final five overs.