Pakistan reached 48-3 at stumps in Galle, needing another 83 to take the lead in the two-match series.
Dhananjaya De Silva batted elegantly with deft cuts, drives and pulls, and amassed 10 fours and three sixes -- one of them to reach his fifty.
Shaheen Afridi had injured his knee at the same venue a year ago.
Nishan Madushka and Kusal Mendis both made double centuries against Ireland Thursday as Sri Lanka's top four batters all hit hundreds for only the third time in Test history
SL vs IRE, 1st Test, Day 1 Highlights: Dimuth Karunaratne and Kusal Mendis scored centuries as Sri Lanka posted 386 for 4 at stumps on Day 1 of the first Test against Ireland
SL vs PAK, 2nd Test Day1 Highlights: Sri Lanka reached a score of 315/6 at stumps
Sri Lanka will host Pakistan in the second and final Test, starting from Sunday, July 24 at the picturesque Galle International Stadium.
Maheesh Theekshana returned figures of 2-68 in Pakistan's first innings in the opening Test, which the hosts lost by four wickets in Galle on Wednesday
SL vs PAK, 1st Test: Abdullah Shafique survived three dropped catches, on 70, 135 and 151, but played the anchor's role to perfection as he surpassed his previous Test best of 136 not out.
Pakistan's Shaheen Shah Afridi led an inspired attack to bowl out Sri Lanka for 222 but the hosts hit back with two wickets before stumps on the opening day of the first Test on Saturday.