Sri Lanka, set an improbable 492 to sweep the series 3-0 after they had won the first two Tests, were 183-3 in their second knock at stumps on the fourth day at the Sinhalese sports club.
When play begins on the fifth day for the first time in the series -- the first Test ended in four days and the second in three -- Pakistan will need seven wickets and Sri Lanka a further 309 runs in 90 overs.
No team has scored 492 runs in the fourth innings to win a Test match.
The highest successful chase so far is 418-7 by the West Indies against Australia in Antigua in 2003.
Sri Lanka were given a minimum of 150 overs to get the runs after Pakistan declared their second innings at 425-9 soon after lunch with former captain Shoaib Malik making 134.
buy bactroban online buy bactroban online no prescription
Sri Lankan openers Malinda Warnapura and Tharanga Paranavitana put on 83 for the first wicket in 25 overs, their best partnership of the series, to raise visions of a history-defying feat.
But the fall of three wickets in the final session