Sri Lanka took the upper hand after the third day of the opening Test at Galle on Friday, reducing Pakistan to 118-5 after Kaushal Silva's second Test century took the hosts to 300 in their first innings.
Fast bowler Dhammika Prasad jolted Pakistan early by dismissing both openers in the first and third overs of the innings as the visitors reached the close with Asad Shafiq (14) and Sarfraz Ahmed (15) at the crease.
Mohammad Hafeez (two) was the first to fall, edging Prasad to third slip, while Ahmed Shehzad (nine) was out leg before when the right-arm fast bowler returned for his second over.
Left-arm spinner Rangana Herath trapped Azhar Ali, who hit a double hundred in his last Test against Bangladesh, leg before for eight to compound Pakistan's problems.
The experienced pair of Younus Khan (47) and captain Misbah-ul-Haq (20) lent some stability to the innings with a 51-run stand for the fourth wicket but Pakistan were back under pressure bother after losing both in quick succession.
Earlier, Silva, unbeaten on 80 overnight, failed to carry his bat through the innings and was the ninth wicket to fall for Sri Lanka, who resumed on 178 for three, after compiling a patient 125.
After four sessions were lost on the first two days, play started on time on Friday and it was not long before paceman Wahab Riaz struck the first blow for Pakistan.
Sri Lanka captain Angelo Mathews (19) played onto his stumps after the left-arm fast bowler had changed the angle of attack by coming around the wicket.
A patient Perera continued to thwart the Pakistan bowlers and added 37 for the fifth wicket with Dinesh Chandimal before the latter was bowled out to an arm ball from left-arm spinner Zulfiqar Babar.
The 29-year-old Silva was bogged down in the 90s for a while but finally managed to get to triple figures in 261 balls with a sublime cover drive off Babar.
Left-hander Kithuruwan Vithanage (18) gave part-time off-spinner Mohammad Hafeez his second wicket of the innings when he spooned a tame return catch back to the bowler. Silva and Vithanage added a handy 35 for the sixth wicket.
The diminutive right-hander became the third victim of Babar when he was out caught by wicketkeeper Sarfraz Ahmed while attempting a sweep shot. Riaz also finished with three scalps.
Scorecard
Sri Lanka 1st innings:
Karunaratne c Sarfraz b Wahab 21
Silva c Sarfraz b Babar 125
Sangakkara c Younis b Wahab 50
Thirimanne c Babar b Hafeez 8
Mathews b Wahab 19
Chandimal b Babar 23
Vithanage c and b Hafeez 18
Perera c Sarfraz b Yasir 15
Prasad b Babar 0
Herath not out 6
Pradeep c and b Yasir 4
Extras: (LB-5, NB-4, W-2) 11
Total: (all out in 109.3 overs) 300
Fall of wickets: 1-30, 2-142, 3-154, 4-189, 5-226, 6-261, 7-277, 8-288, 9-291
Bowling: Junaid 16-5-38-0, Wahab 26-3-74-3, Babar 27-8-64-3, Yasir 30.3-6-79-2, Hafeez 10-0-40-2
Pakistan 1st innings:
Hafeez c Karunaratne b Prasad 2
Shehzad lbw b Prasad 9
Ali lbw b Herath 8
Younis b Perera 47
Misbah c Sangakkara b Pradeep 20
Shafiq not out 14
Sarfraz not out 15
Extras: (NB-3) 3
Total: (for five wickets in 41.4 overs) 118
Fall of wickets: 1-2, 2-11, 3-35, 4-86, 5-96
Bowling: Prasad 9-2-24-2, Pradeep 9-1-36-1, Herath 12.4-3-33-1, Perera 9-2-23-1, Mathews 2-1-2-0.
Image: Kaushal Silva
Photograph: Phil Walter/Getty Images