Ahmed Shezhad's century has helped reduce Sri Lanka's lead over Pakistan in the third Test in Sharjah, but with time running out and wickets falling, the tourists may feel that they have the edge.
The home side still trail by 137 runs with four first-innings wickets left and only two days of play left to try to force a series-levelling victory.
In reply to the Sri Lankan's 428-9d, Shezhad led the response with 147 at the top of the batting order, aided by 52 from fellow opener Khurram Manzoor.
However, partnerships were in short supply for the Pakistan side as Rangana Herath (3-88) did the most damage, with captain Misbah-ul-Haq (36 not out) providing the last major hope of posting a challenging first-innings total.
Sri Lanka lead the three-match series 1-0 after winning the second Test in Abu Dhabi last week.