Young Sri Lankan seamer Thisara Perera claimed 4-57 to pin Pakistan against the ropes on the opening day of the third and final Test in Pallekele on Sunday.
The tourists, sent in to bat for the second time in consecutive matches, failed to adjust to the moving ball on a responsive wicket and collapsed to 56-4 soon after the first hour.
Pakistan recovered through a fifth-wicket stand of 85 between skipper Misbah-ul-Haq (40) and Asad Shafiq (54 not out) before going to tea at a shaky 172-5.
Shafiq reached his sixth Test half-century by slashing Dilhara Fernando over the slips for his seventh boundary just before tea and remains Pakistan's last batting hope in the innings.
Mohammad Sami was unbeaten on eight as Adnan Akmal retired hurt on 10 after he was struck on the left hand by a ball from Fernando that did not rise as much as the batsman expected.
Sri Lanka, who won the first Test in Galle before the second in Colombo was drawn, are seeking their first series win in three years, after defeating New Zealand 2-0 at home in 2009.
Perera, a 23-year-old playing only his sixth Test, made an immediate impact in his maiden appearance in the series by grabbing three wickets in his first eight overs.
Unlike the second Test where Mahela Jayawardene's decision to field on a flat track backfired as Pakistan ran up 551-6 declared, the hosts finally found conditions that suited the bowlers.
The bounce on the greenish pitch was less than expected -- the wicket-keeper stood up to the stumps as early as the third over -- but there was considerable movement in the air and off the wicket.
Perera, taking advantage of overcast conditions, struck after Pakistan's openers had rattled up 35 by the eighth over, bowling Mohammad Hafeez with a delivery that swung in sharply.
Hafeez, who scored 196 in the second Test, made 22 with four hits to the fence.
Azhar Ali, another century-maker in Colombo, edged a wild drive off Perera to Thilan Samaraweera at gully before he had scored a run.
Sri Lanka earned two further wickets on either side of the morning drinks break when veteran Younis Khan was caught behind off Kulasekara and Taufeeq Umar was leg-before to Perera for 29.
Misbah defended stoutly for his 40 off 95 deliveries as he rebuilt the innings with Shafiq, but fell just when the pair appeared set for a big partnership.
Misbah, who hit seven fours, followed a ball from Perera that was pitched outside the off-stump and gave wicket-keeper Prasanna Jayawardene an easy catch.
Sri Lanka suffered a setback before the start when experienced opener Tillakaratne Dilshan opted out of the Test and returned home to Colombo due to health worries in his family.
Dilshan was replaced by Dinesh Chandimal, while Suraj Randiv and Nuwan Pradeep made way for Fernando and Perera.
Pakistan also chose a three-man pace attack with Umar Gul and Sami, who both missed the second Test, coming in for Aizaz Cheema and Abdur Rehman.