Jonny Bairstow insisted that his instant success as England's new No.3 would not distract him from his ultimate goal of winning back the Test wicketkeeper's role, after his emotionally charged century had underpinned England's batting on the first day of the third Test at Colombo.

Bairstow top-scored with 110, and in so doing had to overcome some painful bouts of cramp in the intense heat and humidity, caused in part, he admitted, by his immobility while wearing a cast on his foot, following the ankle injury he sustained while warming up in a game of football during the one-day series.

And that setback, he added, had inspired him to produce a telling response to his perceived critics.

"It means a lot," Bairstow told Sky Sports. "There are different things you go through when you get castigated about being injured for doing x, y and z when people haven't actually seen what's gone on.

"The bits behind the scenes, when you're doing your rehab and sleeping on an ice machine, the things that people don't see and yet they have an opinion on it. It's all well and good when things are going well and people have an opinion on how well you're playing, but it's the hidden things that they don't see."

Bairstow's injury had opened the door for Ben Foakes to make a serene arrival in the team. His century on debut at Galle, allied to flawless glovework, appeared to leave the former incumbent on the outside of the team looking in. But, when Sam Curran sustained a side strain in the second Test at Kandy, Bairstow was handed a new route back into the team as a specialist No.3, and he seized the role with alacrity.

"You've got to deliver when you're asked to," he said. "When you're left out of the side, and you haven't actually done too much wrong over the last couple of years, and all of the sudden you're asked to bat in a role where you've not batted before, you learn on the job. That's how I've seen it, an opportunity to learn on the job."

Though England have been crying out for a long-term solution at No. 3 - with Joe Root reluctant to fill the role, England have tried four different options on this tour alone - Bairstow was adamant that he was not going to be content in the side until he'd won back his original role.

"There's conversations to be had," he said. "I've not given up my keeping, I want to make that very, very clear. I'm still working hard on my keeping because it's something I still want to do. I've worked hard for the last nine years so I'm not going to give it up after one or two games that you miss. It's fantastic to have the challenges ahead, and I'm happy with my start.

"When challenges arise, you want people to rise with those challenges, and hopefully I've done that. You could quite easily take your bat home for whatever's gone on but putting things in perspective and what have you over the last couple of weeks has been massive."

It was yet another display of intense mental fortitude from a player who has made a habit of disproving the doubters in a variety of contexts throughout his England career. After being thrown in at the deep end during the mayhem of the 2013-14 Ashes, when Matt Prior's injury offered him a chance to feature in the final two Tests, he has spent the past four years turning himself into a Test-class wicketkeeper batsman. And, in white-ball cricket, he usurped first Jason Roy and then Alex Hales to become one of the foremost openers in the ODI game.

"Of course I enjoyed it," Bairstow said of his latest achievement. "You look at the challenges that have been put in front of me as a cricketer over a period of time and there's been quite a few. And I like to hope I've come through most challenges along the way.

"I'm desperately proud of this last couple of weeks," he added. "It's been tough, real tough. People sometimes don't see the hard work behind the scenes, people sometimes have an opinion when they are sat at home and don't see the graft that's going on, in the heat and humidity.

"I'm proud as punch of the work I've done because that [ankle] injury should potentially have set me back for six to eight weeks, but I'm back in four and playing in a Test match.

"Over a period of time you learn to tap into things that motivate you, and get you through some difficult times."

While the events of the past month have been tough for Bairstow to deal with as a professional sportsman, he revealed that his struggles had been put into context by a pair of off-field tragedies involving his friends and former team-mates.

"These last couple of weeks, there's a lot of people who've been in worst times than me," he said. "Two people back home passed away these last couple of weeks, which puts things in perspective. It just shows we are playing a game of cricket, and people seem to have an opinion on that. We are playing a game, we try our best."

Andrew Miller is UK editor of ESPNcricinfo @miller_cricket