The tourists, chasing a record 458-run target, were 140-2 in their second innings at lunch after resuming at 89-2.
Opener Shoaib Malik was unbeaten on 49 with Faisal Iqbal on 36 at the interval.
The highest-ever total to win a Test is 418, achieved by the West Indies against Australia at Antigua in 2003.
Only 19 overs were possible due to rain in the extended morning session and Pakistan did well to keep their wickets intact, especially against ace off-spinner Muttiah Muralitharan.
Muralitharan bowled unchanged from one end, but failed to break the Malik-Faisal stand despite having five men close to the bat. He was economical, having so far conceded just 34 runs in his 23 overs.
Malik, dropped on 14 by wicket-keeper Kumar Sangakkara on Wednesday, got the benefit of the doubt in the morning when TV umpire Tyronne Wijewardene turned down a stumping appeal.
He has so far hit five fours in his 171-ball knock.
The second and final Test begins in Kandy on April 3.