Sri Lanka captain Angelo Mathews was vindicated for surprisingly deciding to field after winning the toss when his fast bowlers skittled Pakistan for 165 in the first innings of the second Test in Dubai on Wednesday.
Sri Lanka then lost opener Dimuth Karunaratne (32) before reaching 57 for 1 when bad light brought an end to the day's play.
Kaushal Silva and Kumar Sangakkara (both 12) were the unbeaten batsmen at the crease.
Ahmed Shehzad (3) was the only batsman out in the morning as Pakistan put up 57 for 1 at lunch after Mathews became the first captain in six Tests to put the opposition in at the International Stadium.
But the plot changed quickly in the afternoon session as Pakistan slumped from 78 for 1 to 127 for 6, with the Sri Lanka pace trio picking up two wickets apiece.
Pakistan opener Khurram Manzoor (73) survived some nervous moments before completing his sixth half-century in Tests and added 50 for the second wicket with Mohammad Hafeez (21).
Nuwan Pradeep was impressive on his recall to the Test side after a year and finished with three wickets for 62 while Shaminda Eranga picked up the prized scalps of the experienced Younus Khan (13) and Misbah-ul-Haq (one).
Younus and Misbah departed in the space of an over in similar fashion, edging Eranga to wicketkeeper Prasanna Jayawardene.
Sri Lanka's other fast bowler, Suranga Lakmal, accounted for Manzoor and Asad Shafiq (6) while left-arm spinner Rangana Herath polished off the Pakistan tail to pick up three wickets, having given up a total of 26 runs in the innings.
Pakistan failed to capitalise on some dropped catches by the Sri Lankan fielders and lost their last eight wickets for just 58 runs.
Pakistan (1st innings):
Khurram Manzoor c P. Jayawardene b Lakmal 73
Ahmed Shehzad lbw b Pradeep 3
Mohammad Hafeez b Pradeep 21
Younus Khan c P. Jayawardene b Eranga 13
Misbah-ul-Haq c P. Jayawardene b Eranga 1
Asad Shafiq c Silva b Lakmal 6
Sarfraz Ahmed c P. Jayawardene b Pradeep 7
Bilawal Bhatti not out 24
Saeed Ajmal c Silva b Herath 8
Rahat Ali lbw b Herath 0
Junaid Khan lbw b Herath 2
Extras: (lb-7) 7
Total: (all out; 63.5 overs) 165
Fall of wickets: 1-28, 2-78, 3-107, 4-109, 5-118, 6-127, 7-129, 8-151, 9-151
Bowling: Lakmal 21-6-45-2, Eranga 14-4-25-2, Pradeep 18-2-62-3, Herath 10.5-3-26-3.
Sri Lanka (1st innings):
D. Karunaratne lbw b Junaid 32
K. Silva not out 12
K. Sangakkara not out 12
Extras: (lb-1) 1
Total: (one wicket; 16 overs) 57
Still to bat: M. Jayawardene, D. Chandimal, A. Mathews, P. Jayawardene, R. Herath, S. Eranga, S. Lakmal, N. Pradeep
Fall of wickets: 1-40
Bowling: Junaid 7-1-26-1, Rahat 7-1-28-0, Ajmal 1-1-0-0, Bilawal 1-0-2-0
Image: Khurram Manzoor
Photograph: Francois Nel/Getty Images