Pakistan 48 for 5 (Randiv 2-5, Kulasekara 2-15) trail Sri Lanka 472 (Sangakkara 199*, Dilshan 101, M Jayawardene 62, Ajmal 5-146) by 424 runs
Scorecard and ball-by-ball details

After the first day in Galle, the score was 300 for 2; on the second day, 13 wickets went down for 219 runs. Those contrasting statistics, however, did nothing to change the overall status of the match: Sri Lanka continue to boss the game, first piling on 472 (their highest total against Pakistan in Sri Lanka), and then raising more questions about the fragile Pakistan batting by taking out five early wickets.

Despite Sri Lanka being in charge, it was a bittersweet day for Kumar Sangakkara. He became the quickest batsman to reach 2000 Test runs against a single team, but he also became only the second player in Test history to be stranded on 199. That too, after signalling his double-century in the penultimate over of the innings, only to be told it was a scorecard error.

In the morning, Saeed Ajmal had underlined why he's the top-ranked Test spinner in the world by taking three big wickets to raise hopes of a Pakistan fightback. Prasanna Jayawardene, though, again showed his value as a lower-order scrapper, supporting Sangakkara for a couple of hours to keep Sri Lanka firmly ahead in the Galle Test.

That advantage was multiplied in the final hour and a half as Pakistan's batting floundered in the fading light. Nuwan Kulasekara repaid his recall to the Test side after more than a year on the sidelines by taking two wickets in his third over. His trademark inswinger made only an infrequent appearance but that didn't affect him as he had Taufeeq Umar lbw shouldering arms to a delivery on the stumps, and then handed Azhar Ali a golden duck as the batsman flirted with a ball outside off, only to feather it to the keeper.

Then the spinners took over. Mohammad Hafeez was a prime candidate for the lbw as he adopted the dangerous tactic of playing flighted length deliveries off the back foot. He escaped a few times against Rangana Herath, but not against Suraj Randiv, who then dismissed the nightwatchman Ajmal first ball. Herath had reward for his sustained interrogation of the batsman's technique by getting Asad Shafiq to edge to the keeper. The umpires had a tough time as there were innumerable vociferous appeals, as the spinners regularly operated with five fielders round the bat. Younis Khan survived, but at 48 for 5, a long tail and the follow-on 224 runs away, Pakistan are left needing a miracle.

Batting wasn't easy in the morning either as only 11 runs had come off the first seven overs. Like on Friday, Mahela Jayawardene decided to ease the pressure with an enterprising stroke, this time a reverse-sweep for four. Two balls later, he went for the slog-sweep against Ajmal, but missed and was bowled.

Sangakkara has been Sri Lanka's most assured batsman in the match, but even he had his problems against Ajmal. He used the slog-sweep effectively, picking up a couple of boundaries in an Ajmal over, but in between he was beaten by the extra bounce Ajmal generated. Once, as he looked to defend outside off, he couldn't get anywhere near the ball as it spun away sharply.

He survived, but Thilan Samaraweera didn't last long. The Ajmal doosra, possibly the most feared delivery in Test cricket today, confounded Samaraweera, dragging him out of the crease, before Adnan Akmal completed a smart stumping. The very next ball, Angelo Mathews perished, though it wasn't due to any Ajmal magic. It was a full and wide delivery that Mathews limply drove at to hand the bowler a simple caught-and-bowled. In two deliveries, Ajmal had taken as many wickets as Pakistan had on all of the first day.

Left-arm spinner Abdul Rehman didn't have the same success as Ajmal, though he too posed plenty of questions for the batsman. Early in Prasanna Jayawardene's innings, Rehman got a delivery to drift in before spinning just past the outside edge, and bouncing just over the middle stump. A wicket there and Sri Lanka would have been 346 for 6, and Pakistan could have eyed a quick close to the innings.

Instead, once again a Sangakkara-Jayawardene partnership frustrated them. The batsmen found it a little easier after lunch, with Prasanna flicking several boundaries off his pads. Sangakkara was circumspect after those early slog-swept boundaries, dealing almost entirely in singles and zeroes, perhaps a silent tribute to mark the 100th birth anniversary of the great logician Alan Turing. The pair added 80 to lift Sri Lanka past 400, and though Prasanna was caught behind on 48, the damage had already been done.

Sangakkara moved to 170 by tea, but with Pakistan striking twice more before tea, he showed more urgency after the break. He did decline several singles to keep Rangana Herath away from the strike, but he also launched a six over long-on, attempted a scoop - a shot he hadn't tried all match - and pushed Herath to return for a tight second that resulted in a run-out. When on 192, there was an impatient swing that lobbed to mid-off but the bowler Mohammad Hafeez couldn't latch on to a tough chance.

Soon after, he swiped a six over midwicket and celebrated as the scorecard showed his 200, but the dressing room soon pointed out that he was still on 199. He defended the next ball, the final delivery of the over, to give strike to the last man Nuwan Pradeep, who was bowled off the second delivery, leaving the Galle crowd disappointed despite Sri Lanka's strong position.

Siddarth Ravindran is a senior sub-editor at ESPNcricinfo