Kevin Pietersen hit a swashbuckling and eventful 151 to brighten England's prospects of a series-levelling victory in the second and final Test against hosts Sri Lanka on Thursday.
The 31-year-old batsman lit up day three's play with his array of scintillating shots, hitting 16 fours and six sixes as England secured a handy 185-run lead before being bowled out for 460 in their first innings.
Pietersen, whose attempts at playing his switch-hits earned him an warning, joined Ken Barrington with 20 Test tons and now has more international centuries (29) than any other English batsman.
Sri Lanka had one over to face and they survived scoring four without loss, all leg byes.
Nightwatchman Dhammika Prasad came out to open with Lahiru Thirumanne and survived a leg before appeal off Jimmy Anderson.
The day belonged to Pietersen and there was drama when he was in the 90s.
Twice he moved into position to play the controversial switch-hit shot and bowler Tillakaratne Dilshan pulled up during his delivery stride on both occasions when he saw the batsman changing his stance.
Pietersen was subsequently warned for the premeditated movement and was told a repetition would mean a five-run penalty, match referee Javagal Srinath said in a statement.
That, however, did not happen and Pietersen was trapped leg before by left-arm spinner Rangana Herath (6-133) who picked up his 10th five wicket haul in a Test innings.
Sri Lanka picked up two wickets during the afternoon session with Herath accounting for Jonathan Trott (64) and Prasad removing Ian Bell (18).
Trott, pushing forward, edged the ball to Sri Lanka skipper Mahela Jayawardene at slip to depart after a 137-ball knock that included seven fours.
Bell was dismissed when his hook found Suraj Randiv at mid-wicket, having helped Pietersen in a fourth-wicket stand of 94 off 118 balls.
Left-arm spinner Herath went on to account for Matt Prior (11), Tim Bresnan (five), Graeme Swann (17) and Anderson (two) as England lost their last five wickets for 49 runs.
Sri Lanka's only success of the morning session came when Dilshan ended Alastair Cook's (94) 5-1/2-half hour vigil at the crease, denying the batsman his 20th Test century.
The opener failed to get to the pitch of ball and his edge was held by Jayawardene in the lone slip position. The left-hander faced 278 balls in his watchful knock, during which he hit nine fours.
Cook and Trott, who had scored a valiant century in England's loss in the Galle Test, added 91 for the second wicket.
Sri Lanka, who lead the two-match series 1-0, used up both their reviews unsuccessfully before they had taken the second new ball.
Sri Lanka first innings 275
England first innings (overnight 154-1)
A. Strauss c P. Jayawardene b Dilshan 61
A. Cook c M. Jayawardene b Dilshan 94
J. Trott c M Jayawardene b Herath 64
K. Pietersen lbw b Herath 151
I. Bell c Randiv b Prasad 18
M. Prior c Prasad b Herath 11
S. Patel c Prasad b Randiv 29
T. Bresnan b Herath 5
G. Swann c Dilshan b Herath 17
J. Anderson lbw b Herath 2
S. Finn not out 2
Extras (b-1 lb-2 nb-2 w-1) 6;
Total (all out, 152.3 overs) 460;
Fall of wickets: 1-122 2-213 3-253 4-347 5-380 6-411 7-419 8-454, 9-458 10-460;
Bowling: Lakmal 22-4-81-0(2nb), Prasad 23-8-63-1(1w), Herath 53-9-133-6, Dilshan 20-4-73-2, Randiv 34.3-4-107-1.
Sri Lanka (second innings)
D. Prasad not out 0
L. Thirimanne not out 0
Extras (lb-4) 4;
Total (no wicket, 1 over) 4;
Bowling: Anderson 1-1-0-0.
Photograph: Shaun Botterill/Getty Images