Pakistan 19 for 0 trail Sri Lanka 428 for 9 dec (Perera 95, Mathews 91, Sangakkara 52) by 409 runs
Scorecard and ball-by-ball details

Sri Lanka's prospects of winning their first away series since 1999-00 (excluding those in Bangladesh and Zimbabwe) improved significantly after their captain Angelo Mathews and debutant Dilruwan Perera, picked primarily for his offspin, batted vast periods of time on the second day in Sharjah. Both batsmen were dismissed in the 90s, and because of their slow run rate Sri Lanka scored only 428 despite batting nearly two days, but Pakistan's inability to take ten wickets deprived them of precious time in a Test they need to win to level the series.

Having resumed on 220 for 5, Sri Lanka continued at snail's pace. They scored 82 runs in 35 overs for the loss of Prasanna Jayawardene during an extended first session, and 57 runs in 29 overs for the loss of two wickets in the second. They were quicker in the third - 69 in 18 overs - but Sri Lanka's last two wickets added those runs. Pakistan had not bowled so many overs in an innings - 172 - since the Rawalpindi Test against India in 2004. They were able to keep their sense of humour, though, and several players shook Saeed Ajmal's hand after he bowled his 50th over.

The day's centrepiece was the seventh-wicket stand between Mathews and Perera that spanned 53.2 overs and produced 112 runs. But their resistance would not have reached such proportions if Pakistan had better luck. They had been on the wrong end of four reviews on the first day - three umpire's-call decisions went Sri Lanka's way - and the trend continued.

In Abdur Rehman's first over, the day's fifth, Mathews was struck low on the front pad while pushing forward to defend, but umpire Richard Kettleborough said not out. On review, replays indicated the ball would have hit a sizeable portion of leg stump, but the on-field umpire's call remained. Pakistan's count of unsuccessful reviews in this series was now 14 out of 15, and Mathews went on from 34 to score 91 off 256 balls.

The partnership between Mathews and Perera was only 20 when Ajmal pitched a doosra in line with the stumps from round the wicket and hit Perera's pad, but umpire S Ravi denied the appeal. Pakistan had exhausted their reviews and were frustrated as replays indicated Perera was plumb. He made 95 off 247 balls.

The day had begun with the Pakistan players examining the rough on the pitch, but its appearance proved deceptive because the surface did not misbehave. There was no pace, seam and swing, and the turn was slow. The ball after Mathews survived the review, though, Prasanna hooked a bouncer from Mohammad Talha straight to long leg to end Sri Lanka's sixth-wicket partnership on 73. It was perhaps the only delivery to hurry a batsman.

With runs coming relatively easily against the fast bowlers, Misbah-ul-Haq brought Rehman on and he dried one end up. And after Ajmal was introduced in the 12th over of the day, Sri Lanka slowed to a crawl. Perera had cut his first ball in Test cricket - off Talha - to the boundary and then proved he had both patience and solid defensive technique.

It was soon after Ajmal's first appeal against Perera was turned down that Sri Lanka's pace picked up. Perera swept the offspinner for four and then charged Rehman to clear the long-on boundary. In between those shots, Junaid Khan had returned for his second spell and Mathews pulled him for four. He later reached his half-century off 157 balls.

Mathews also brought up the 100-run stand by pulling Rehman for four, and then had a chat with Perera after Ajmal began to trouble the batsman. Perera was on 43 when Ajmal struck his pads and appealed for another lbw. It wasn't as close as the previous ones but on another day, another umpire might have given it out and few would have complained. Umpire Ravi did not, and Ajmal's rage was on full display. Perera inside edged the next ball from Ajmal past his stumps to the boundary.

Like Sangakkara on the first day, Mathews' wicket was sudden. Junaid bowled a wide one and Mathews slashed to hole out to deep point when a century was there for the taking. Rangana Herath lasted just one ball, with Junaid doing what the spinners had strived to all day - earn an lbw.

There was no more relief for Pakistan, though. Perera began to open up, and brought up his 50-run stand with Shaminda Eranga off only 77 balls with a flurry of shots against Ajmal. He moved to 95 with an on-the-up drive off Talha, but hooked the next ball in the air and was caught at fine leg. Perera missed becoming the fourth Sri Lankan batsman to score a Test century on debut, but his innings ensured Sri Lanka were on their way to a series win.

George Binoy is an assistant editor at ESPNcricinfo