Shaun Udal, the former England offspinner, has announced his retirement from first-class cricket, three years after he had originally decided to quit the game. Udal, 41, had called time in 2007 after nearly 20 seasons with Hampshire but was lured out of retirement soon after by Middlesex, who he has represented since.

Udal helped Middlesex to the t20 Cup in the 2008 season, towards the end of which he took over as the club's captain. He resigned from the role earlier this year. He led Middlesex in the Stanford 20/20 in 2008 and Twenty20 nearly provided him an unlikely international comeback at the age of 40, when he was named in England's preliminary squad for the World Twenty20 in 2009.

Udal played the last of his four Tests for England in 2006 and his final ODI in December 2005. The highlight of his international career was his 4 for 14 on the final day of the Mumbai Test in 2006 which helped England to a famous series-levelling victory against India.

In a first-class career spanning 22 seasons, Udal collected 822 wickets at 32.47, including 37 five-wicket hauls, and scored nearly 8000 runs at 22.59. He also played 410 List A matches, taking 458 wickets at 30.19 and making 2966 runs.

"I am extremely lucky to have played the game I love for such a long period of time," Udal said. "It is obviously a sad day - waving goodbye to something very special is always difficult - but I look forward to getting stuck in to the next chapter of my life."

Angus Fraser, Middlesex's managing director of cricket, hailed Udal's contribution to the club. "When Shaun took over as Middlesex captain, he inherited a fractured dressing room and morale was low," Fraser said. "During the two years he captained Middlesex Shaun successfully pulled the team closer together and the dressing room is now a far happier and united place. He has handed over to Neil Dexter a club in far better shape than the one he inherited."