Mohammad Rizwan smashed 52 off 38 balls towards the end to lift Pakistan to 287-8 in the second one-day international against Sri Lanka here today.
Azhar Ali played a captain's innings of 79 and senior pro Shoaib Malik made a run-a-ball 51, the pair adding 83 for the fourth wicket after the tourists won the toss and elected to bat in the day-night match.
But Rizwan stole the show with five boundaries and a six as the tourists plundered 88 runs in the last 10 overs.
More From This Section
Pakistan had won the first match in Dambulla by six wickets last Saturday to take the lead in the five-match series.
Ninth-ranked Pakistan need a series win to stay in contention for a place in the eight-nation Champions Trophy in England in 2017.
Sri Lanka, currently ranked fifth, are assured of taking part in the tournament.
Ahmed Shehzad put on 59 for the first wicket with Azhar when he was bowled by debutant left-arm spinner Sachith Pathirana for 30 in the 14th over.
Mohammad Hafeez, the hero of Pakistan's win in Dambulla with four wickets and a century, managed only nine this time when he became Pathirana's second victim to make it 75-2.
It soon became 96-3 in the 24th over when Babar Azam was bowled by Milinda Siriwardana for 12, but Malik joined Azhar to steer the tourists out of trouble.
Pathirana and sling-arm fast bowler Lasith Malinga claimed two wickets each.