Pakistani batsman Younis Khan fired away a 177 before being caught out by Sri Lankan all rounder Kithuruwan Vithanage off Dilruwan Perrera's delivery in the first innings.
Pakistan put up a total of 451 all out with skipper Misbah-ul-Haq scoring 31 runs before being caught Niroshan Dickwella off Rangana Herath's delivery.
Perrera claimed five wickets through his off break deliveries. In addition to Younis' wicket he claimed Sarfraz Ahmed's wicket for his individual score of 55, Abdur Rehman just after his half-century, Saeed Ajmal for his individual score of 12 and Junaid Khan for a duck.
Meanwhile, the slow left-arm orthodox bowler Herath claimed three wickets from his deliveries, claiming Azhar Ali's wicket for his individual score of 30 and Asad Shafiq for his individual score of 75 in addition to Misbah's wicket.
Pakistan's Mohammad Talha remained unbeaten on nine.
For Sri Lanka, opener Upul Tharanga fell early for just 19 runs after the hosts went in to bat. Tharanga got lbw off Junaid Khan's delivery.
Kaushal Silva and former Sri Lanka skipper Kumar Sangakkara remain unbeaten on 38 and 36 respectively.