A half-century from Shan Masood has helped Pakistan to reach 99-2 at tea on day four of the third Test in Pallekele, as they chase down Sri Lanka's target of 377 to win.
The Men in Green bowled the hosts out for 313 before lunch, which included a five-wicket haul for Imran Khan.
Ahmed Shehzad and Masood walked out to the middle for the afternoon session with Pakistan looking to achieve their highest-ever fourth innings total, beating the 343-3 they posted against South Africa in 2010.
Pakistan suffered a blow early on when Shehzad failed to get off the mark before losing his wicket, as he was clean bowled by Suranga Lakmal in the second over.
Azhar Ali was the next man in but could only make five before he edged Dhammika Prasad's delivery to Dinesh Chandimal, leaving Pakistan in trouble on 13-2.
Younis Khan joined Masood at the crease and the pair quickly set about instigating a recovery. The duo battled their way to a 50 partnership, before Masood notched up his individual 50 with a single to long-off.
Sri Lanka failed to find another wicket before tea, meaning that Masood (52*) and Khan (41*) will resume the evening session in the middle.