Pallekele - Young seamer Thisara Perera grabbed a career-best 4-63 as Sri Lanka bowled out Pakistan for 226 on the opening day of the final Test in Pallekele on Sunday.
Left-arm spinner Rangana Herath chipped in with three wickets after Sri Lankan captain Mahela Jayawardene put the tourists in to bat for the second consecutive match.
Pakistan hit back to reduce Sri Lanka to 44/3 by stumps as left-arm seamer Junaid Khan removed Dinesh Chandimal and dangerman Kumar Sangakkara in the space of four deliveries.
Chandimal was leg-before for eight, while Sangakkara was bowled for zero after making 199 not out and 192 in the previous two Tests.
Mohammad Sami then trapped skipper Jayawardene leg-before in the last over of the day to cap an absorbing day's play at the Pallekele International Stadium.
Pakistan, looking for a series-levelling win, failed to adjust to the moving ball on a responsive wicket and collapsed to 56/4 soon after the first hour of play.
They recovered through a fighting 75 from Asad Shafiq, who put on 85 for the fifth wicket with skipper Misbah-ul-Haq (40) before the innings terminated midway through the post-tea session.
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 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.
Shafiq reached his sixth Test half-century by slashing Dilhara Fernando over the slips for his seventh boundary just before tea, but soon ran out of partners.
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 Chandimal, while Suraj Randiv and Nuwan Pradeep made way for Fernando and Perera.
Pakistan included Umar Gul and Sami, who both missed the second Test, in place of Aizaz Cheema and Abdur Rehman.