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 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, was 4-0 from one over in its second knock at close with Lahiru Thirimanne and Dhammika Prasad at the crease. England, which lost the first Test in Galle by 75 runs, has two days to force a series-leveling win on the wearing P. Sara Oval wicket and retain its No. 1 ranking. Pietersen was warned twice by the on-field umpires before the tea break for changing his stance to make a switch hit — a right-hander playing a shot with a left-hander's grip. The warning 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. “There was no altercation at all,” Pietersen 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.” Match referee Javagal Srinath of India said a third offense 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 it 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. 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 Jayawardene at first slip. 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 Jayawardene in the slips. Herath finished with figures of 133-6.