England batsman Kevin Pietersen has announced his shock retirement from one-day and Twenty20 internationals.

The 31-year-old former Hampshire star has played 127 ODIs and 36 T20Is and was a first-choice player in both formats. But he will now continue his England career as a Test specialist only following discussions with the England and Wales cricket Board earlier this month.

Pietersen said: "After a great deal of thought and deliberation, I am today announcing my retirement from international one-day cricket.

"With the intensity of the international schedule and the increasing demands on my body, approaching 32, I think it is the right time to step aside and let the next generation of players come through to gain experience for the ICC World Cup in 2015."

Pietersen, who was man of the tournament when England won the World Twenty20 in the West Indies in 2010, was willing to help defend the trophy in Sri Lanka this autumn but the ECB have decided that centrally-contracted players must be available for both limited-overs formats or neither.

"I am immensely proud of my achievements in the one-day game, and still wish to be considered for selection for England in Test cricket," he added.

"For the record, were the selection criteria not in place, I would have readily played for England in the upcoming ICC World Twenty20."

Pietersen's absence for the World Twenty20 is particularly relevant given he was the only England batsman to be selected in the recently concluded Indian Premier League.

As a result of his decision, Pietersen's current England contract will be downgraded for the rest of its duration and he will only be available in the future for a lower-tier deal.

The ECB's decision not to allow players to pick and choose between ODI and Twenty20 formats has not previously been made public.

Andrew Strauss was the last senior player to retire from ODI cricket and he was not part of the Twenty20 set-up.

As such, today's news brought out an explanation from the board.

A statement read: "The terms of the central contract state that any player making himself unavailable for either of the one-day formats automatically rules himself out of consideration for both formats of the game as planning for both formats is closely linked.

"This is designed to reflect the importance of one-day international cricket which is a strategic priority as England look for improved performances in the 2013 ICC Champions Trophy and the 2015 ICC Cricket World Cup."

Hugh Morris, managing director of England cricket, placed on record his thanks for Pietersen's efforts since his debut in 2004 but did not hide his frustration at the timing.

Morris said: "The ECB is disappointed by the timing of Kevin's decision less than four months before we defend our ICC World Twenty20 title. Kevin is a world-class player and I would like to take this opportunity to thank him for his efforts and we look forward to his continued contributions to the Test match side.

"The selectors will now replace Kevin in both the ODI and the T20 squads."

Reports emerged at the end of last year's World Cup that Pietersen was going to retire from 50-over cricket but when asked directly ahead of the first Test of the summer he embarked on a long and occasionally tetchy defence of his hunger to perform across the formats.

He went on to play just 13 more ODI matches for his country, though, bowing out with back-to-back centuries against Pakistan in Dubai.

In those innings he looked back to his very best, taking to an opening role with distinct panache and responsibility as he chalked up scores of 111 not out and 130.

Yet his overall record - nine hundreds and 4184 runs at 41.84 - does not quite do justice to an exceptional talent who announced himself with three centuries in his second one-day series against a hostile South Africa.