Kevin Pietersen has insisted that he will not abandon his switch hit after receiving a formal warning by the umpires for misusing the stroke during the second Test at the P Sara Oval.

Pietersen, en route to one of the most flamboyant of his 20 Test hundreds, shaped to play the switch hit before Tillakaratne Dilshan was in his delivery stride and later admitted he was not aware of the regulation that prevents him moving prematurely. Pietersen, who made his 20th Test hundred, began to get into place for the shot as Dilshan started his run-up and the bowler twice aborted his run up.

The incident occurred during an enthralling head-to-head between Pietersen and Dilshan, which had already seen Pietersen switch his grip around to strike the bowler through the off side. However, Pietersen then began to set himself earlier for the shot and Dilshan refused to deliver which led to a stalemate.

Asad Rauf, the umpire at the bowler's end, signalled the warning to Pietersen after the second aborted delivery after consulting with his colleague Bruce Oxenford. Pietersen gesticulated towards the officials, clearly unsure about what he was being penalised for. The immediate consequence was that if Pietersen, or any other England batsman, did it again during the innings Sri Lanka would be awarded five penalty runs.

"There's no issue, I just got my timing wrong," Pietersen said. "He said it was a warning because I moved my hands a bit too quick. I don't understand the rules, it's something I found out today, mid-innings, at a pretty unfortunate time. I've just got to switch my hands a little later, which I didn't know. You learn something new every day. Once I'd been warned I enquired about it."

Andy Flower, the England team director, immediately went to the match referee's room for clarification over the issue, his second visit of the match following his questioning of a review against Thilan Samaraweera on the first day. The ball after the official warning, Pietersen reverse-swept again and brought up his hundred. He went on to make 151 from 165 balls as England pushed for their first victory of the winter.

Oxenford, who was at square leg when the warning was given, spoke to Sky Sports after the day's play. "The ICC think switch-hitting is an excellent innovation," he said. "But when the bowler sees intent [in the batsman altering his stance] prior to delivering the ball and stops what can happen is we can get a stalemate situation...the bowler won't deliver because he wants to change his field if he thinks the batsman is going to switch-hit.

"When we get to that situation the way to move forward is to give the batsman an informal warning, then a formal one for time-wasting. If it happens again it's a team warning under time-wasting by the batting side and it's an automatic five-run penalty."

An ICC statement in May 2010 said: "The ICC Cricket Committee adopted the updated directive introduced earlier in the year which prevents the batsman from altering his grip or stance before the bowler enters his delivery stride. Should the bowler see a batsman change his grip or stance prior to the delivery stride the bowler can decide not to bowl the ball."

Graham Ford, the Sri Lanka coach and a mentor to Pietersen, appeared more to speed with the regulation. "The rule is quite clear: if the batsman sets himself up prior to the bowler's release and the bowler sees him and is able to stop the warning is issued. I think for about every single one he set himself up before the release except for the ones straight after the warning. I think it was all handled pretty well."

When Pietersen first unveiled the switch hit against New Zealand in 2008 it provoked debate about the legality of the shot because, for example, if a bowler wants to change from right to left arm (however rare that occurrence may be) he has to inform the umpire and the batsman. There are also implications for what fairly constitues a wide delivery or lbw. However, the MCC approved the shot, citing the difficultly level as a main reason, and hailed it as a good innovation for cricket.

"MCC believes that the 'switch-hit' stroke is exciting for the game of cricket," was the conclusion. "Indeed, the stroke conforms to the Laws of Cricket and will not be legislated against...MCC believes that the 'switch-hit' stroke is a difficult shot to execute and that it incurs a great deal of risk for the batsman. It also offers bowlers a good chance of taking a wicket and therefore MCC believes that the shot is fair to both batsman and bowler."

After this latest incident, the MCC added: "A batsman is still entitled to play the switch-hit stroke but he is only allowed to alter from one stance or grip to another once the bowler has entered his delivery stride. Pietersen should therefore have only been warned if the umpire was certain that Dilshan had not entered his bowling stride before the batsman shaped to play the switch-hit."

Pietersen believes there is more danger for the batsman and says it is a shot he will continue to play - if with slightly different timing.

"Like I said when I played it against New Zealand, I don't think the batsman should get penalised because I'm taking the biggest risk," he observed. "I've always said I'll play to that side of the field when there's no one there. I don't find it a hard shot, I can just manipulate the field when they bowl a leg-stump line. It's a shot worth playing."