England off-spinner Graeme Swann has announced his retirement from international and first-class cricket.
The Nottinghamshire player, 34, has taken only seven wickets in this Ashes series defeat and has ruled himself out of the rest of the tour.
"This decision has been very difficult seeing as the England team has been my family for seven years now, but I feel it is the right time," he said.
Swann is sixth on the list of England wicket-takers with 255 in 60 Tests.
"I don't regret a single day of my career," he added. "Every high has been celebrated with verve and vigour and every low painfully accepted as a chance to learn and improve."
Swann's shock decision comes at the end of a week in which Australia secured an unassailable 3-0 series lead with two Tests to play and the player apologise for making comments on Facebook comparing his team's loss with rape.
Australia coach Darren Lehmann said: "It was a bit of a surprise. It's mid-tour, but obviously he's decided he's had enough.
A number of England players took to Twitter to praise Swann.
"Congrats on an amazing career mate you can be a very proud man," said England wicketkeeper Matt Prior on Twitter.
Fellow England and Nottinghamshire bowler Stuart Broad added: "A great friend and team-mate retired today. Been a pleasure to play and tour for Nottinghamshire and England."
Following the departure of batsman Jonathan Trott with a stress-related illness earlier in the tour, Swann's retirement further unsettles England ahead of the fourth Test, which starts in Melbourne on Boxing Day.
"I know I'm making the decision for the right reasons," added Swann.
"My body doesn't like playing five-day cricket any more and I don't feel I can justify my spot in the team in the latter stages of a game.
"As a spinner, that's when you need to come into your own.
"With two games to go in Australia and then a fiercely competitive summer against Sri Lanka and India, I feel that it is a great time for someone else to strap themselves in and hopefully enjoy the ride as much as I have."
Swann, first named in an England squad back in 1999-2000, made his Test debut in 2008 and took four wickets against India in Chennai.
He established a reputation for taking wickets in the first over of a spell and became the sixth-highest wicket-taker for his country.
Despite struggling with elbow problems in recent years, Swann played in three Ashes series victories and helped England become the number one Test side in the world in 2011.
He also took 104 wickets in 79 one-day internationals after making his debut against South Africa in Bloemfontein in 2000 at the age of 20 and spent a spell as the top-ranked ODI bowler in 2011.
In addition, he helped England clinch their first major global world title at the 2010 World Twenty20 in the Caribbean.
"My personal highlights include the three Ashes victories, which I will cherish for the rest of my life, and the World T20 victory in the West Indies, which ranks as my limited overs highlight," he added.
"I have met, played with and against, and become friends with some magnificent people throughout my journey and feel truly privileged to have been given these opportunities."
Former England captain Michael Vaughan said Swann had quit "too soon". adding: "Spinners of his quality are a rare breed. Of all the England players over the last 20 years, he is the one the team will miss the most."
BBC cricket correspondent Jonathan Agnew described Swann as a "true character" who had made a "massive contribution" to England.
Agnew said: "The general feeling was that this might be Swann's last tour, but this is unexpected. England's greatest challenge is replacing the man who was the lynchpin to their four-man attack."
England team director Andy Flower paid tribute to Swann's "outstanding contribution" to the team.
"His commitment, competitive spirit and sense of humour have been recognised and admired by team-mates and supporters alike," he said. "He has played a big part in England's success over the last five years."
England bowler Tim Bresnan said Swann's retirement will be a relief to some batsmen around the world.
"I will miss your constant put downs and abuse of my mental capacity," Bresnan said on Twitter. "Also, many batsmen around the world have just exhaled a huge sigh of relief due to your constant challenge of the stumps and prodigious spin."
England batsman Johnny Bairstow added: "Congratulations on a fantastic career. Thank you for the laughs, memories and smiles. Good luck mate, you are going to be missed."
"Going to miss you a lot," said England bowler Steve Finn. "Hope the next chapter is as exciting."