"Masterpiece" is a word that should be used sparingly in descriptions of 21st century batsmanship. Too often the odds are stacked in favour of the man holding the willow, on friendly pitches in grounds with quick outfields and short boundaries, against willing but often limited bowlers. However, on the final two days of the first Test between Sri Lanka and Australia in Galle, Mahela Jayawardene played an innings that defied a pitch weighted heavily towards the men in the field. His 105 was indeed a masterpiece, demonstrating supreme technique and mental application but also aggression in a most unlikely chase. Though his effort was ultimately futile, it serves as a grand example of bad-wicket batting at a time when such conditions are as rare as they have ever been. He described the innings and its unique challenges to ESPNcricinfo.

When we went to bat in the second innings we wanted to be more aggressive and try to put pressure on the Australians. We knew the wicket was going to be tough, but the only way we were going to have a chance of getting close to that target was by being positive and getting runs on the board. If you get runs on the board then they'll be thinking as well. But losing early wickets didn't help again. [Tharanga] Paranavitana got out first ball, then [Tillakaratne] Dilshan, so Kumar [Sangakkara] and I had to just calm the ship down a bit and steady things, see where we could head with it.

Jayawardene and Sangakkara built their stand slowly, and seemed to be in a state of some control, when Shane Watson managed to get a ball to jump up viciously at Sangakkara, which removed the batsman and pushed Australia still further into a position of dominance. Looking on from the other end, Jayawardene put it all to the back of his mind.

Kumar got a brilliant ball that was pretty unplayable, so once that happened I realised I had to stick to a game plan. There were certain bowlers who were quite difficult to play on that track and some guys I could take risks and score off, so I just played along with that. [Angelo Mathews and I] knew with the hardness of the second new ball it would do a bit on that surface because it was pretty soft, and we just had to somehow ride out that period and the bowlers would probably get tired then and we might have a sniff at the Australian target.

Even in the first innings we knew the wicket was going to be tough. There's always the chance of one scooting through or just jumping up. So we told the guys, "If that happens, that happens, but if you're looking for that ball, you lose the ball you can score off, and you should always be looking for runs on a wicket like that." My focus was on how I'm going to bat and how I'm going to score runs off every ball. If it's not there then I'll let it go and look for the next ball to score runs off. I was taking each ball and just hoping I wouldn't get one of those nasty ones coming my way. I had a few but I managed to fend them off. As soon as that happens you have to forget that moment and look to the next ball and say, "This is another opportunity to score."

Normally among the most flowing of strokemakers, not once in the innings did Jayawardene try to hit a cover-drive, scoring only two of his 105 runs through the cover/extra-cover regions.

You know you can't play certain shots and they had two or three guys catching in front anyway, and you don't know after the ball pitches what is going to happen off the wicket. Sometimes it comes off nicely, sometimes it holds back, so you can't go for those extravagant cover-drives. I would rather just punch the ball through for a couple of runs rather than look for that big, flashy boundary and get myself out. I completely blocked certain shots, I wasn't going to hook or pull on that wicket. Anything short, I was going to let it go, just because I wasn't confident of the pace of the wicket and the bounce. So there were quite a few shots I said I'm not going to play on that wicket.

I think over a period of time you tend to make mistakes as a batsman, and to identify those mistakes and make sure there's no pattern to it, and you tend to see how you could structure a game plan for your batting in different conditions. Maybe as a youngster I would've taken those risks and paid the penalty. If you can learn from that and say, "Okay, fine, these are things I can control"... I've just tweaked a bit here and there and made sure I don't make the same mistakes twice.

"I completely blocked certain shots, I wasn't going to hook or pull on that wicket. Anything short, I was going to let it go, just because I wasn't confident of the pace of the wicket and the bounce"

Part of the challenge for Jayawardene was facing up to an extended examination from bowlers he had not faced much or at all. The new-ball pair of Trent Copeland and Ryan Harris posed plenty of questions: Copeland with his accuracy and patience, Harris with his movement and hustle.

I saw the clips of Trent in the warm-up game, and spoke to a couple of the boys who played in the match as well. I had a fairly good idea of what he was trying to do, and I knew on that surface he's going to be a much tougher opponent, because it is not going to come onto the bat and he's going to bowl at a much slower pace than the rest of the boys. If he's going to maintain that consistent line and length on that wicket, then he is going to be hard to play, especially with the height he's got. He'd be a different proposition when the ball is going to come onto the bat - that pace might be very good for you to score runs off - but on that surface I knew I couldn't. So I was waiting for him to give me anything with width or anything on the legs.

I've faced Ryan quite a bit in the IPL the last two or three years, and in Australia as well, a couple of times. But we all knew the quality of the guy, we knew he's very consistent, hitting those areas - very aggressive, a lot of effort, and he will rush you more often than not. The wicket suited him. It was doing a bit - not in the sense of a seaming track, but because of the softness it wasn't allowing us to use his pace as much. We just had to wait for something that was in our zones. He was very consistent with his line and length and bowled very good areas to most of our boys. He was probably the outstanding performer in that Test match. The surface was more suited to the spinners, and they did dominate for a while, but of the fast bowlers on both teams he was the guy who was in control and who understood that wicket.

Watson posed a similar threat, albeit at a reduced pace, but Mitchell Johnson was another case entirely. Famously enigmatic, he kept Jayawardene wary throughout with his capacity to bowl the unplayable ball, though there were also plenty of deliveries to leave alone and a handful to tuck away off the hip.

Mitch is always going to be that aggressive bowler in the line-up. He's probably got the licence to do whatever he wants, and he's naturally a wicket-taking bowler - he's not a guy who is going to bowl one length, one line and wait the whole day. On his day he is lethal but on some days he can give you a lot of runs and not be so lethal. On that wicket he was tough, with his pace and variation, and you're not sure exactly what the wicket's going to do. We played him a little better, but he did come up and take some wickets at crucial times of the game, and created opportunities. Especially for the tailenders, he was a bit too much to handle.

More or less cornered by the quicker bowlers, Jayawardene had to find a way to release some of the pressure on himself and Mathews, and found a path via the spin of the inexperienced Nathan Lyon. Though Lyon had bowled very well in the first innings, taking five wickets on debut, and though the pitch offered him handsome degrees of turn, Jayawardene chose in this case to play the man rather than the ball, and collected 54 runs from the 61 balls he faced. As against the quicks, nothing went through cover.

I probably played certain shots no one anticipated I would play on that wicket, against the spinner, who I took on because I was very confident of doing that. It put a bit of pressure on them. I knew he was an inexperienced bowler, so there were certain things you can do but others you need to hold back.

It was the first time we've seen him, and for a guy who hasn't played that much first-class cricket to come to these conditions... I think he bowled really well in the first innings. The conditions definitely suited him and he took the opportunity and bowled really, really well. We handled him well in the second innings and played to our strengths and put him under pressure. I knew that, yes, he might create an opportunity with the wicket helping him, but at the same time I tried to dominate him as much as I could because I felt I could get runs off him, whereas the fast bowlers I wasn't able to get runs off - I could play them but they weren't giving me that many runs. So I knew I had to go after him, and he probably gave me a bit of loose stuff as well, when I put him under pressure.

As time went by on the fourth morning, Jayawardene and Mathews built a significant partnership and frustrated Australia. There was a sense of education as much as partnership about their union, as Jayawardene guided his younger counterpart in the best way to survive and score.

He's a naturally gifted player, he plays his shots. I didn't want him to go into a shell. What I told him was about trying to have a game plan, trying to curb a few shots on that surface, and then still be aggressive but work the ball around. I wasn't trying to give him too much advice, I was just giving him options - telling him it'll be tough to play this guy against the spin, or difficult to pull this guy, but still be positive and look to score runs in certain ways. There were certain options he had to hold back because otherwise he's a very free-playing guy. So a great opportunity for me to learn quite a bit and it showed a lot of character as well for him to do that.

The morning session passed without a wicket, and soon after the break Jayawardene went to his century. He had demonstrated so much control and judgement in the most testing circumstances, and the moment was one of great release. He had not given Australia a chance.

I've always tried to enjoy the moment. I don't think too far ahead, I don't think too much about what has happened behind me. So I was quite happy with that hundred and I just celebrated, because I've missed out on a couple of hundreds in the last two or three years. So to get that hundred was important. After that I just went back into my zone. Just that moment [of celebration], you need that sometimes, after concentrating and going through a period where you're trying to do certain things as much as you can.

Both sides knew, however, that the second new ball would mark a change in the script. Australia's plans had been made plain in the morning warm-ups, when the wicketkeeper, Brad Haddin, was seen catching a new ball even though it remained more than 30 overs away at the start of play. Harris took the new ball eagerly, and would effectively end the contest when he finally found a way through Jayawardene's defences after 311 minutes and 231 balls of defiance.

With the harder seam and the harder ball on that dusty wicket there is always going to be something happening. So it was a conscious effort from myself and Angelo that we try to ride that period through. We knew the bowlers were tired, so if we'd been able to bat for another 15-20 overs we probably could have got that ball older and got through another session. But guys like Ryan bowling in those areas are always going to create an opportunity. For three sessions I'd managed to stop those balls coming through my gate, but it was just one of those things - I got an inside edge and it went through. He probably was the best bowler on that surface on that day and he deserved the wicket.

Jayawardene had a century and still more respect among his peers as a Test batsman of the highest quality, but he was left with the emptiness of an individual contribution that did not see his team through to overall success.

It was definitely satisfying personally, but not as much as those scores that are made when the team has won matches. That is the ultimate thing for any cricketer. Once, against New Zealand in 1998, on a similar sort of wicket, we played and we won, so that was much more satisfying - and against a quality attack as well. There are certain knocks where you know you played really well and gave your team an opportunity to win the match, and then it becomes much more prominent. And there are some knocks where I've felt I batted really well but it is not so significant because the team hasn't won, so regardless of how you bat, it doesn't count, but personally for me it gives confidence that I can do this, so then I build on that for the next knock, the next knock and the next knock. It is a work in progress.

Daniel Brettig is an assistant editor at ESPNcricinfo