Sri Lanka spinners Rangana Herath and Suraj Randiv bowled Pakistan out for 100 at lunch on the third day of the first test on Sunday.
Sri Lanka, who scored 472 in their first innings, did not enforce the follow-on and decided to bat a second time.
Pakistan's last five wickets lasted just a session as Herath and Randiv ran through the bottom order.
Herath made the first breakthrough of the day by trapping Younis Khan lbw for 29. Younis was clearly unhappy with the decision and television replays later showed him getting an inside edge onto the pads.
Compounding Pakistan's misery, debutant Mohammad Ayub and wicketkeeper Adnan Akmal were involved in a mix-up where both batsmen finished at the striker's end.
Akmal swept Herath to fine leg and set off for a run and called for a second but Ayub was hesitant to take it. Akmal found himself at the same end when the throw from Nuwan Pradeep came to Herath, who had all the time in the world to take the bails off at the non-strikers end.
After Akmal departed for nine the end came swiftly.
Randiv trapped Abdur Rehman lbw for one and finished the innings off when Umar Gul (2) made a big heave and the resulting top edge was caught by wicket-keeper Prasanna Jayawardene to give the bowler his fourth wicket of the innings.
Herath ended Ayub's innings at 25 trapping him lbw to finish with three for 30. Nuwan Kulasekera took two for 27 on his return to test cricket after two years out of the picture.