Opener Abdullah Shafique stood unbeaten on 139 as Pakistan reached lunch needing 44 more runs with five wickets in hand to complete record chase at Galle in the opening Test against Sri Lanka.
Pakistan were 298 for five at lunch on day five, chasing 342 for victory at a venue where the highest successful fourth-innings chase was 268 by Sri Lanka against New Zealand in 2019.
Jayasuriya has taken four wickets so far and is on the brink of an unprecedented feat of four straight five-wicket hauls in his first two Tests.
He took 12 wickets on debut in a series-levelling Test win over Australia last week at the same venue, six in each innings.
Pakistan resumed the day on 222-3 and Sri Lanka soon used up their remaining two umpire reviews, with Jayasuriya involved in both calls.
Mohammad Rizwan opened his day's account with a boundary off Ramesh Mendis and kept up his positive intent by taking singles and twos before he fell lbw to Jayasuriya for 40.
A review did not save Rizwan, a wicketkeeper-batsman who has come into the two-match series after a successful stint with English county Sussex.