Dhammika Prasad got rid of both the tourists’ openers in his first two overs to return the whip hand to the Sri Lankans, who had earlier lost their final five first-innings wickets for 39 runs.
They were bowled out for 300 having resumed on 178-3,??Kaushal Silva completing his second Test century before he was ninth man out.
Silva came through an edgy spell in the nineties, reaching his hundred with a cover drive off his 261st ball and going on to make 125 – 14 short of his Test-best score.
The opener’s wicket was one of three for slow left-armer Zulfiqur Babar, while Yasir Shah’s leg-breaks also yielded a couple of wickets.
It was pace that did the early damage when Pakistan strapped on the pads, Prasad having Mohammad Hafeez caught at third slip before trapping Ahmed Shehzad in front.
The same fate befell Azhar Ali – Rangana Herath the bowler this time – and at 35-3 a revised follow-on target of 151 looked a long way off.
Pakistan are not there yet, but old hands Younis Khan and Misbah-ul-Haq repaired some of the damage with a 50 stand before both fell in the final session.