Kevin Pietersen shrugged off a switch-hit controversy to smash an explosive 151 off 165 balls as England took charge of the second Test against Sri Lanka in Colombo on Thursday.
The flamboyant Pietersen plundered 16 boundaries and six sixes in his 20th Test century as the tourists piled up 460 in their first innings before being all out just before stumps on the third day.
Sri Lanka, trailing by 185 runs, were 4-0 from one over in their second knock at close with Lahiru Thirimanne and Dhammika Prasad at the crease.
England, who lost the first Test at Galle by 75 runs, have two days to force a series-levelling win on the wearing P. Sara Oval wicket and retain their number one ranking.
Pietersen was warned twice by the on-field umpires before the tea break for changing his stance to make the eye-catching but risky switch-hit - a right-hander playing a shot with a left-hander's grip.
The 31-year-old played down the incident, which ended with him walking up to the umpires to clarify the warning.
"There was no altercation at all," he said. "I was just finding out what it was and they were telling me what it was. It was just timing. No drama, no issue."
Pietersen, who made three and 30 in the Galle Test, said his returning confidence - underlined by the switch-hit - enabled him to score briskly.
"I have felt in fantastic form so it was just a case of cashing in when you're in good nick," he said.
"The amount of cricket we play now, it doesn't matter if we are playing one-day or Tests, it all rolls into one. I played in one-day mode today."
The switch-hit incident marred an otherwise profitable day for the tourists, who finally came good with the bat after losing four Tests in a row in Asia this year - the 3-0 rout by Pakistan and the Galle defeat.
Pietersen said England were in a good position despite losing the last five wickets for 49 runs.
"Tomorrow will be an interesting day's cricket," he said.
The warning for Pietersen from officials Bruce Oxenford and Asad Rauf came after bowler Tillakaratne Dilshan had to stop twice in his run-up as Pietersen turned around in his stance.
The laws of the game state the switch hit is legal, but a batsman cannot change stance before the bowler has delivered the ball.
Match referee Javagal Srinath of India said a third offence by any of the England batsmen in the innings would have resulted in five penalty runs being awarded to Sri Lanka.
The incident marred an otherwise profitable day for the tourists, who finally came good with the bat after losing four Tests in a row in Asia this year - the 3-0 rout by Pakistan and the Galle defeat.
But England may feel that they ought to have punished the hosts more.
Alastair Cook hit 94 and Jonathan Trott followed his 112 at Galle with 64, the pair sharing a second-wicket stand of 91 after skipper Andrew Strauss made 61 on Wednesday.
Pietersen reached his hundred in the same over he was warned, executing a reverse sweep for two, and celebrated the landmark by pulling the next ball from Dilshan for a boundary.
He had given England the lead with his third six, a straight drive off Suraj Randiv, which also brought up his half-century.
The South Africa-born batsman had earlier smashed two fours and a six off three consecutive deliveries from Randiv, and also hammered Dilshan high over long-off.
Pietersen, who put on 94 for the fourth wicket with Ian Bell (18), was dismissed in the final session when he was leg-before to Rangana Herath as he tried to sweep the left-arm spinner.
Cook fell six short of his 20th century for the second time in four Tests when he edged off-spinner Dilshan to skipper Mahela Jayawardena at first slip.
The 27-year-old had also fallen for 94 in the second Test against Pakistan in Abu Dhabi in January, when he was leg-before to another off-spinner, Saeed Ajmal.
Trott added just two runs to his lunch score of 62 when he edged a sharp turning delivery from Herath to give an easy catch to Jayawardena in the slips.