An unbeaten century stand between Saud Shakeel and Agha Salman rescued Pakistan from a precarious 101-5 on the second day of the rain-hit opening Test on Monday.
In response to Sri Lanka's 312, Pakistan reached 221-5 when rain stopped play with the tourists still 91 runs behind. Sri Lanka's left-arm spinner Prabath Jayasuriya took three wickets, including skipper Babar Azam.
Sri Lanka batsman Dhananjaya de Silva had earlier made 122 to hand the hosts a respectable total. "I know I can absorb the pressure with my experience of having played in 50 Tests and can control the game," said De Silva. "That is why the captain and management has trusted in me and given me the number six spot to bat."
Sadeera Samarawickrama (R) plays a shot as wicketkeeper Sarfaraz Ahmed (2R) watches during the first day of the first Test match. AFP
But De Silva said they still fell "100 runs short" after they elected to bat first at the start of the two-match series. Pakistan faltered in their reply before Shakeel, on 69, and Salman, on 61, put on 120 runs to steady the innings and thwart the Sri Lankan spinners.
The left- and right-hand batting combination of Shakeel and Salman mixed the right dose of caution and aggression, with 12 boundaries and a six between them.
The pair showed maturity in tackling the spinners by using their feet to get to the pitch of the ball, with Pakistan scoring at nearly five runs an over.
'Even-steven position'
"Coming into these conditions one thing Sri Lanka does really well is hold opposition to miserly run rates and they get the wickets in between as well," Pakistan batsman Shan Masood told reporters.
"We lost wickets but the way we played allowed us to stay in the game and once we got that healthy partnership going the two teams are in an even-steven position."
Teammates congratulate their bowler Agha Salman for taking the wicket of Sri Lanka's Sadeera Samarawickrama during day one of the first Test match in Galle on Sunday. AP
Sri Lanka had come out roaring when pace bowler Kasun Rajitha got Imam-ul-Haq out for one and Jayasuriya sent back Abdullah Shafique for 19.
The left-handed Masood hit back as he smashed 39 off 30 balls but fell lbw to Ramesh Mendis, who was denied the wicket by the on-field umpire before Sri Lanka successfully reviewed.
Azam fell when he got an inside edge onto his pads and the ball looped to short leg, taken by wicketkeeper Sadeera Samarawickrama.
De Silva earlier moved from his overnight 94 to register his 10th Test ton in his 50th match to bolster Sri Lanka's position from a shaky 54-4 on Sunday.
Pace spearhead Shaheen Shah Afridi, fellow quick Naseem Shah and leg-spinner Abrar Ahmed ended on three wickets each to bowl out Sri Lanka and lunch was called.
The second day's play began early with revised timings for each of the three sessions and de Silva soon got to his hundred off Shaheen.
De Silva, who smashed 12 fours and three sixes, got useful runs with the lower order before he finally fell to Naseem, who struck twice after Pakistan took the second new ball.
Agence France-Presse