Mahela Jayawardene scored four streaky runs in his last Test as Pakistan's bowlers dismantled Sri Lanka's first innings at the start of the second and final match in Colombo on Thursday.
The hosts, who won the toss and elected to bat on the easy-paced wicket, found runs hard to come by against the steady attack and plodded to 261-8 by stumps on the opening day at the Sinhalese Sports Club.
Upul Tharanga hit 92 and fellow opener Kaushal Silva made 41, but Sri Lanka lost seven wickets on either side of the tea interval after coasting at 144-1.
Pakistan's two left-arm seamers Junaid Khan and Wahab Riaz toiled manfully under the hot sun to share seven wickets and lead a spirited display by the tourists seeking a series-levelling win.
Junaid ended the day with four for 69, including two wickets in the first over with the second new ball taken towards the end of the day's play. Riaz had three for 66.
Sri Lanka skipper Angelo Mathews made 39 when he was caught behind off Riaz for what became the last delivery of the day.