Sri Lanka captain Dimuth Karunaratne batted through pain to help the hosts stretch their overall lead to 323 runs and boost their chances of a series-levelling victory in the second Test against Pakistan on Tuesday.
The hosts were 176-5 when bad light stopped play on day three with Karunaratne on 27 and Dhananjaya de Silva on 30.
Having conceded a lead of 147, Pakistan claimed four wickets in the second session, but the 59-run stand between Karunaratne and de Silva put Sri Lanka in a strong position.
Earlier, Ramesh Mendis claimed 5-47, his third five-wicket haul in Tests, as Sri Lanka bowled out Pakistan for 231 to secure a significant lead. Resuming on 191-7, Yasir Shah and Hasan Ali batted resolutely to deny Sri Lanka any breakthrough in the first hour.
Once Prabath Jayasuriya (3-80) removed Hasan, however, Sri Lanka did not take long to polish off the Pakistan tail with Mendis dismissing Nauman Ali and Yasir.
Yasir faced 97 balls for his 26 and was the last man out.
Sri Lanka, having decided Karunaratne would bat only if required, sent Niroshan Dickwella to open with Oshada Fernando.
The stop-gap arrangement did not really work and Naseem Shah had Dickwella caught behind for 15.
Yasir struck with his first ball to dismiss Oshada (19) and was denied a second wicket when Babar Azam dropped a catch, his third spill of the match, to reprieve Kusal Mendis.
Kusal (15) could not capitalise on it, though, and Karunaratne walked out to bat after Angelo Mathews departed for 35.
Naseem sent back the in-form Dinesh Chandimal (21) soon after the tea break reducing Sri Lanka to 117-5, but de Silva and Karunaratne looked largely untroubled.
Pakistan pulled off a thrilling 342-run chase in the opening match to grab a 1-0 lead in the two-Test series.
Sri Lanka 1st Innings 378
Pakistan 1st Innings 231
Sri Lanka 2nd Innings
Niroshan Dickwella c M. Rizwan b N. Shah 14
Oshada Fernando lbw Y. Shah 19
Kusal Mendis lbw M. Nawaz 35
Angelo Mathews c B. Azam b A. Salman 35
D. Chandimal c M. Rizwan b N. Shah 21
D. Karunaratne not out 27
Dhananjaya de Silva not out 30
Extras (b9, lb2, nb2, w1) 14
Total (for 5 wickets in 50 overs) 176
Fall of Wickets: 1-27 (Niroshan Dickwella, 5.6 ov), 2-47 (Oshada Fernando, 10.1 ov), 3-59 (Kusal Mendis, 15.2 ov), 4-100 (Angelo Mathews, 29.5 ov), 5-117 (Dinesh Chandimal, 34.6 ov)
Bowling: Hasan Ali 5-0-24-0, Naseem Shah 9-1-29-2, Yasir Shah 12-2-41-1, Mohammad Nawaz 11-2-32-1, Nauman Ali 5-0-15-0, Agha Salman 7-1-18-1, Babar Azam 1-0-6-0