Pakistan's captain followed up on his five wickets against Kenya in the previous game with a four-wicket haul (4-34) as Sri Lanka, chasing Pakistan's 277-7, replied with 266 for nine wickets.
Pakistan stalwarts Younis Khan [ Images ] (72) and Misbah-ul-Haq (83 not out) had earlier shared a century partnership to set co-hosts Sri Lanka a challenging target to chase under lights.
But Pakistan spinners strangled the Sri Lankan batsmen, capturing six of the nine wickets to fall.
The top scorer for Sri Lanka was Chamara Silva with 57 off 78 balls.
Younis and Misbah came together after Pakistan were reduced to 105 for three and guided the team to a challenging total.
Earlier, Mohammad Hafeez [ Images ] and Kamran Akmal were left wondering which of them was out after a mix-up left them both comically stranded at the same end.
Kamran Akmal scampered to the striker's end for a quick single when Hafeez swept the ball behind the wicket facing off spinner Muttiah Muralitharan [ Images ] in the 13th over.
Hafeez did not move an inch, even after Sri Lanka wicketkeeper and skipper Kumar Sangakkara's [ Images ] initial wayward throw flew well over Muralitharan. Angelo Mathews [ Images ] successfully returned it to the bowler for the simplest of run outs.
For a couple of agonising minutes -- for Pakistan -- the confused batsmen tried to figure out who faced his marching orders before Hafeez trudged disconsolately back to the pavilion after a brief consultation with the umpires.
The dismissal, to the huge delight and amusement of a partisan, packed Colombo crowd, left Pakistan on 76-2.
Kamran Akmal did not last for much longer and he fell to Rangana Herath [ Images ] after being easily stumped for 39.
Once Younis and Misbah came together, they employed a safety-first strategy and nudged the ball through gaps to pick up singles and twos instead of trying to score off boundaries against tight bowling and sharp fielding by the Sri Lankans.
Younis struck four fours in his knock of 72 before he top edged a sweep off Herath to Mahela Jayawardene [ Images ] at short fine leg.
Misbah kept a cool head and played a solid innings to remain unbeaten 83 with six fours and batting with a runner.
Shahid Afridi (16) and Abdul Razzak (3) both perished attempting to accelerate the Pakistan run rate.
Left-arm spinner Herath, who replaced Ajantha Mendis [ Images ], ended as Sri Lanka's most successful bowler with two for 46.