The tail wagged for India on day two of this first Test in Galle, and it was the turn of the Sri Lankan tail to plunder some runs on the third day. Staring down the barrel of a big defeat, after losing five wickets on Thursday, Dilruwan Perera showed some gumption with the bat to ensure India would not have it all their way.

The key for Sri Lanka, if they were going to have even a prayer in this Test match, was for Dilruwan and Angelo Mathews, the last recognised batting pair, to put on a big partnership.

And for the first half an hour or so, that looked possible, with both batsmen taking the positive route and putting the pressure back on the Indian bowlers.

The advantage of having 600 runs to play with, though, is that you have the luxury of staying patient, and not worrying about conceding runs, and India eventually got their reward when Mathews (83, 130b, 11x4, 1x6) drove one off Ravindra Jadeja, the pick of the Indian bowlers today, to short cover.

India would have expected to run through the three Sri Lankan tail-enders and finish the innings off in a hurry, but Lanka, to their great credit, didn't just lie down and play dead.

Dilruwan (92 n.o., 132b, 10x4, 4x6), first, forged a nice partnership with Rangana Herath, before doing the same with Nuwan Pradeep and Lahiru Kumara as well, as Sri Lanka pushed the total to 291 in 78.3 overs.

Those last three partnerships added 86 runs for Sri Lanka, with Dilruwan, unlucky not to get to his maiden Test match hundred, marshalling the tail wonderfully well and showing awareness of the game.

He knew when to take the risk and when to take the singles. What Dilruwan also did well was he trusted his partners to not lose their head, and that resulted in giving confidence to the likes of Herath (9, 13b, 1x4), Pradeep (10, 26b, 1x4), Hardik Pandya's first Test wicket, and Kumara (2, 12b).

Dilruwan Perera, Sri Lanka, India, 1st Test, Day 3
Dilruwan Perera frustrated India on day three of the first Test, July 28, 2017Ishara S Kodikara/AFP/Getty Images

India were also a little at fault for just assuming those three wickets would come easily, but what those partnerships also showed was how good a batting wicket it still is.

Ashwin and Jadeja slowed it up on quite a few occasions, and yet there was very little spin on offer.

India would have taken that into consideration and it would have played a big role in them deciding to not enforce the follow-on.

The plan will be to bat for a bit, let the wicket wear down a little more and then make use of that to try and get nine – ten aren't needed with Asela Gunaratne out of the Test match – more wickets to take a 1-0 series lead.