Set an improbable target of 510 runs, Pakistan are 36 for three with two days to go.
Sri Lanka closing the door on Pakistan
Sri Lanka turned the screws on Pakistan in the first Test in Galle after battering the tourists with both bat and ball on the third day on Sunday.
Sri Lanka bowled Pakistan out for 100 in the first innings in reply to their own 472, with off-spinner Suraj Randiv grabbing 4-13 and left-arm spinner Rangana Herath taking 3-30.
The hosts surprisingly declined to enforce a follow-on despite a substantial lead of 372 runs and made 137 for five in their second knock when skipper Mahela Jayawardene declared in the final hour.
Pakistan, set an improbable victory target of 510 runs, were reduced to 36 for three by stumps after seamer Nuwan Kulasekara dismissed stand-in captain Mohammad Hafeez and Taufeeq Umar.
Herath had Azhar Ali taken at silly-point by Thilan Samaraweera, leaving nightwatchman Saeed Ajmal (11) and the team's most experienced batsman Younis Khan (0) at the crease.
The hosts, overwhelming favourites to go 1-0 up in the three-match series, have two days to force a result on the spin-friendly wicket despite forecasts of wet weather on both days.
Pakistan's target was way above the highest fourth innings total ever achieved to win a Test match – 418 for seven by the West Indies against Australia in Antigua in 2003.
Pakistan's best fourth-innings performance is 343-3 which helped them draw the Dubai Test against South Africa in 2010.
The Test has been marred by at least 10 contentious decisions over three days by umpires Steve Davis of Australia and Ian Gould of England, with six of them going against the tourists.
But the Decision Review System (DRS), which allows reviews by the television umpire, is not being used in this series.
Pakistan, who barely managed to surpass their lowest-ever total against Sri Lanka of 90, were bundled out at the stroke of lunch after resuming the day at 48-5.
The tourists were dealt a cruel blow within the first 30 minutes of play when Younis was given out leg-before for 29 by umpire Davis.
Television replays showed a clear inside-edge off the bat on to the pad and a surprised Younis, who had scored 14 of the first 17 runs of the day, stood his ground before walking off.
There was no doubt over the next wicket as Adnan Akmal was run out for nine when Mohammad Ayub refused a second run and both batsmen were stranded at the same end.
Ayub, making his Test debut aged 32, plodded for two hours to score a dour 25 when he was ninth out, leg-before to Herath.
Sri Lanka's second innings was built around an opening stand of 81 between Tillakaratne Dilshan (56) and Tharanga Paranavitana (25).
Gould ruled Dilshan not out when Ajmal appealed for a leg-side catch by the wicket-keeper when the batsman was on 44. Replays showed the ball nick the bat.
Follow us @SprtNationalUAE