Pakistan skipper Babar Azam hit a century on day two of the first Test against Sri Lanka as the visitors were dismissed for 218 in their first innings.
Azam smashed spinner Maheesh Theekshana for a four and then took a single to bring up his seventh Test century as he leapt up in joy in the final session in Galle.
The leading Pakistan batsman averages over 45 in 40 Tests since making his debut in 2016.
Jayasuriya claimed his third successive haul of five wickets or more to rattle the opposition batting, which slumped to 85-7 before lunch and then 148-9 in the second session.
Azam stood firm as he got help from the lower-order batsmen including Yasir Shah (18), Hasan Ali (17) and Naseem, prompting Sri Lanka to rotate their bowling options.
Azam reached his 22nd Test fifty before Hasan departed and he then shielded number 11 Naseem by facing most of the balls in a defiant show of batting.
He hit fast bowler Kasun Rajitha for three straight boundaries and later a six and four off mystery spinner Maheesh Theekshana and Jayasuriya to close in on Sri Lanka’s 222.
For Sri Lanka, it was a taste of their own medicine after they had fought back from 133-8 on Saturday, when Pakistan left-arm quick Shaheen Shah Afridi took four wickets.
Pakistan resumed the day on 24 for two when play started 30 minutes late because of rain and Azhar Ali could only survive three balls before he was trapped lbw by Jayasuriya.