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 into 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.