Lahiru Kumara and Lasith Embuldeniya did the damage as Pakistan was bowled out cheaply on day one of the second Test before losing three wickets in reply at Karachi National Stadium.
Pakistan collapsed from 127-3 to 191 all out after winning the toss, Kumara taking 4-49 and Embuldeniya – replacing the injured Kasun Rajitha – claiming 4-71.
Azhar Ali's side capitulated after Babar Azam (60) and Asad Shafiq (63) made half-centuries in a series-decider after the first Test in Pakistan for a decade ended in a draw, with only 167 overs possible due to rain and bad light.
The tourists were 64-3 at stumps, trailing by 127 runs, Mohammad Abbas picking up 2-21 on an eventful first day.
Vishwa Fernando and Kumara were excellent with the new ball and the former was rewarded when he cleaned up Shan Masood, then bowled captain Azhar for a second-ball duck.
Abid Ali struck a century on debut in the first Test in Rawalpindi and was going along nicely until he was trapped in front by Kumara, reducing Pakistan to 65-3.
The prolific Babar, who made a hundred last week, came down the track to dispatch Embuldeniya for six and also hit eight fours, but the spinner had the last laugh.
Babar was stumped, foxed by the turn when Embuldeniya tossed one up, and the left-arm tweaker struck again to see the back of Haris Sohail before Kumara hit the top of Mohammad Rizwan's off stump.
Kumara was on a hat-trick in the first over after tea when he trapped Yasir Shah lbw and the paceman drew a poor shot from Shafiq as Pakistan lost six wickets for 24 runs.
Shaheen Afridi had Oshada Fernando caught behind in the seventh over of Sri Lanka's reply, with Abbas getting rid of skipper Dimuth Karunaratne (25) and Kusal Mendis (13).
Sri Lanka will be counting on former skipper Angelo Mathews when it resumes on day two looking to secure a healthy lead.