Graeme Swann has taken the unprecedented step of retiring in the middle of an Ashes series. There are always casualties when England lose badly to Australia but usually they are restricted to those in charge. Clearly Swann, England's most successful spinner since Derek Underwood, has had enough of being pummelled by the Australians.

Swann retires after playing 60 Tests for England, with the 255 wickets he took placing him sixth in England's all-time list. He has also retired from first-class cricket with Nottinghamshire but says he may yet be tempted by the Indian Premier League.

"After a great deal of consideration I have decided to call it a day on my international and first-class career," he said. "This decision has been very difficult seeing as the England team has been my family for seven years now but I feel that now is the right time to step down."

In his Sun on Sunday column he added: "I came to Australia in the hope of winning our fourth Ashes series on the trot but that's now impossible. So it's time for someone else to buckle in and enjoy the ride. I could have made myself available for the last two Tests and maybe had a bit of a send-off from the Barmy Army. But that's no reason to hang on for two more games. I like to be the centre of attention – but for the right reasons by winning cricket games."

Swann later appeared at a press conference on Sunday to talk about his retirement. "I know I'm making a decision for the right reasons," he said. "My body doesn't like playing five-day cricket any more and I don't feel like I can justify my spot in the team in the last stages of a game.

"As a spinner, that's when you need to come into your own. Me hanging around with a decision already made in my head wouldn't be right. It would be selfish for me to carry on."

England have not threatened to do that on this tour and Swann has had a miserable time on the pitch. There has been a concerted Australian plan, which has obviously been extraordinarily effective, to target Swann, who has been such a vital component in England's recent success. He has never been hit for six so often since beginning his Test career five years ago. Moreover the Australian bowlers have neutered him as a batsman. Swann has always been the most gifted driver of a cricket ball. He has had nothing to drive in Australia. Instead he has been constantly peppered by Ryan Harris and Mitchell Johnson.

The timing is bizarre. Swann implies that an early withdrawal is a selfless act – to give someone else a chance (initially it will be Monty Panesar, who has been grabbing some timely practice in grade cricket in Sydney over the weekend). The alternative view is that with the ship listing badly all available hands on deck would have been handy. And presumably he has signed a contract.

Swann himself said he could have retired after England's victory in the previous Ashes series. "Why didn't I stop then? I knew more or less that the time was coming up," he said. "But I'd never forgive myself – we had the chance to potentially come out here and win four Ashes series on the bounce.

"It's easy to wish you'd gone out taking 10-for in your last game and being hoisted on people's shoulders."

However, now he has decided that he had had enough. As a Test cricketer he has been a crucial member of the England side, initially defying the experts who felt that finger-spinning was a futile, dying art, and he has brought smiles to countless faces along the way. No doubt he will continue to do that in front of microphones. On the field he will be incredibly hard to replace.

England's team director, Andy Flower, paid tribute to the spinner: "Graeme Swann has made an outstanding contribution to the England cricket team in all formats throughout an incredibly successful career and I would like to congratulate him on all that he has achieved. His commitment, competitive spirit and sense of humour have been recognised and admired by team-mates and supporters alike and he has played a big part in England's success over the last five years.

"The dressing room will be a very different place without Graeme's unique personality and I would like to wish him all the very best for the future."

Swann received praise from his opposite number in the Australian team, Nathan Lyon.

"He's someone who I've looked up to a lot," said Lyon on the Cricket Australia website. "His career stats stand for themselves. He's been an unbelievable spinner and someone who I watched pretty closely in my time.

"I'm sure he will be sorely missed in the England team but I wish him all the best in the future."