Rikki Clarke, the veteran allrounder who won two Test and 20 ODI caps for England, has announced he will retire from professional cricket at the end of the 2021 season.

Clarke, 39, won three Championship titles in a stellar county career - in 2002 and 2019 with Surrey, and in 2012 with Warwickshire - as well as the Pro40 and Twenty20 Cup with Surrey, and the T20 Blast and the Royal London Cup at Warwickshire. He also had a brief spell as Derbyshire captain in 2008.

All 22 of Clarke's England caps came before he reached the age of 25, with his two Tests coming on the tour to Bangladesh in late 2003, and his 20 ODIs spread across three years. He was fast-tracked into the international set-up as a 21-year-old, taking a wicket with his first ball in international cricket, but he was quickly dropped with his progress slower than anticipated.

But he remained a stalwart of the county game in all three disciplines: he has scored 17,750 runs across formats as a fluent middle-order strokemaker, taken 587 catches - mainly at slip where he was a notoriously safe pair of hands - and taken 795 wickets with his medium-paced swing. He will continue to play for Surrey in the Royal London Cup and the final stages of the Championship this year, hoping to end his testimonial year strongly before taking up a role as King Edward's Witley's head of cricket.

"When I started as a professional back in 2000 I could have only dreamt of the career that was to follow," Clarke said in a statement issued by Surrey. "A particular highlight of mine will always be my ODI and Test debuts in 2003. To represent my country 22 times can never be taken away and memories that I will look back on with immense pride. Of course I would have loved to have played more, but it just wasn't meant to be.

"I have played with and against some amazing cricketers throughout my 22 seasons and amongst them made some friends for life. To Surrey and Warwickshire, I thank you for the amazing times and the success that I was able to experience while wearing your badges. I feel very fortunate to have been a part of successful teams and to win all domestic trophies two or three times over. To Derbyshire, I thank you for the opportunity to captain an amazing county and I only wish things could have turned out differently.

"I hope I'm remembered as someone who was honest and played the game the right way. Playing it tough but would always have a beer afterwards regardless of the result. From the age of 9 when I started with Surrey Youth to my older days amongst the grumpiness and moaning will always be someone who cared about the game, loved the game and would always stick up for his team-mates."

Alec Stewart, Surrey's director of cricket, said: ""He should be very proud of his years of excellent service to the county game as well as the 22 international caps he earned. There is no greater honour than representing your country and we were delighted at Surrey that we were able to help him realise those ambitions earlier in his career.

"I first met Rikki when I awarded him with the Player of the Course pennant as a nine-year-old on the 10 week Nescafe training course with Surrey. Years later, he briefly became a team-mate of mine as I approached the end of my playing days and his talent was evident to all in that dressing room.

"When the opportunity arose to bring him back to The Kia Oval in 2017, I didn't hesitate. It proved to be an excellent move as both on and off the field he has been an integral part of the first-team squad in the years since, including his outstanding performances throughout the 2018 Championship-winning season.

"Thank you Rikki for all of your efforts to add to the history of this great club and I wish you all the best with your future endeavours. You'll always be welcome at The Kia Oval."

Matt Roller is an assistant editor at ESPNcricinfo. @mroller98