Pakistan 461 and 48 for 3 (Jayasuriya 2-17) need 83 runs to beat Sri Lanka 312 and 279 (de Silva 82, Ahmed 3-68, Ali, 3-75)
A stirring fightback from Sri Lanka left the home side in with a sniff of stealing a sensational win in the first Test against Pakistan in Galle. On a day where Pakistan looked like shutting the door on Sri Lanka's chances, their bowlers prised that door back open in a frenetic final hour during which Pakistan stumbled to 48 for 3 in pursuit of 131.
While Pakistan relied on their pace bowlers for early breakthroughs in the first innings, Galle's reputation for spin-friendliness - especially towards the back end of a Test - finally began to become apparent as Noman and Abrar Ahmed shared the wickets.
Dimuth Karunaratne and Nishan Madushka provided Sri Lanka with a solid start, having seen off a few overs in the fading light the previous day. There wasn't much rotation of the strike; it wasn't until the 10th over and the 39th run that the first single was taken, but Sri Lanka picked up a boundary each over, and despite some probing lines from Shaheen Afridi and Naseem Shah, looked generally comfortable.
But Abrar's introduction had an immediate impact, as an uncharacteristically loose shot from Karunaratne was caught sensationally by Salman Ali diving low. Madushka and Kusal Mendis returned calm to the innings even though the run rate slowed, seeing off the fast bowlers and looking reasonably assured against spin. But a pair of strikes in the last half hour from Noman turned things around, first trapping Mendis in front of his crease, before a lovely delivery spinning away from Angelo Mathews' outside edge was pouched smartly by Babar at first slip.
Madushka remained solid at the other end but he fell to a careless shot off Noman shortly after getting to his half-century. As in the first innings, though, the fifth wicket partnership was productive for Sri Lanka. De Silva and Dinesh Chandimal attacked Afridi, forcing him out after just four overs. They were more measured against spin, but clever shot selection and regular manipulation of the field kept the runs flowing as they honed in on the lead.
They brought up the 50-run partnership, but no sooner had Sri Lanka edged ahead that Chandimal chipped one to midwicket off Agha Salman, where Imam took a sharp catch. Pakistan's catching across this Test has stood out, and that was more evident in the grab at short leg from Abdullah Shafique that dismissed Sadeera Samarawickrama. Initially wrong-footed by the edge, Shafique adjusted to dive to his right to snare a one-handed diving catch to leave Sri Lanka on the brink.
Pakistan hoped for a quick finish, but Mendis and de Silva stood firm for a 76-run partnership across 23 overs. It was slow going at times, but they never looked uncomfortable against the spinners either side of the tea interval until Abrar finally struck, a missed sweep from Mendis catching him plumb in front.
Thereafter, Pakistan used Afridi and the new ball to burst through the flickering remnants of Sri Lankan resistance. A bit of extra bounce and seam movement finally dismissed Dhananjaya after a brilliant 82. Shaheen then fooled Jayasuriya with a slower ball before Kasun Rajitha scooped one up to Masood at point.
Pakistan had made quick work of the tail, but Sri Lanka made sure the same could not be said of the paltry target. A year to the day after Pakistan chased down 344 at this very venue, pursuit of 131 looks anything but a formality.
Danyal Rasool is a sub-editor at ESPNcricinfo. @Danny61000