MK Dons have confirmed goalkeeper David Martin will leave the club at the end of the season.

The 31-year-old will leave seven years after rejoining the club for a second spell. In two spells totalling eight and a half years, Martin made 332 appearances, and was the number one when the team were promoted to the Championship. He was also named the club’s player of the year in the 2015-16 season.

The player’s contract was due to expire at the end of the current season. The club have confirmed Martin and the club held talks, and have agreed to part company, with the goalkeeper confirming in a statement he is leaving to pursue new challengers.

Martin told the official MK Dons website, “With great sadness, my time with Milton Keynes Dons will come to an end when this season finishes. It has been a great eight-and-a-half years but now is the time to pursue a new challenge.

“I would like to thank the Club, the fans and my team-mates for the fantastic support I have always received, while I reserve a special thank you to my goalkeeping coach Paul Heald and our outstanding chairman – Pete Winkelman. The highlights for me were the first ever meeting between us and AFC Wimbledon, beating Manchester United and gaining promotion to the Sky Bet Championship.”

“I thank the fans that have supported me through all the good and bad times we’ve seen at the Club. Milton Keynes will always be a special place and Club to me. I wish all my friends at the Club all the very best for the future and, I am proud to say, I’ve been part of a special community and Club. We have our last home game of the season on Saturday and it will be my chance to say farewell to our amazing fans.”

Martin was part of the Wimbledon FC squad that first moved to Milton Keynes in 2003, and made 25 appearances for MK Dons before joining Liverpool in 2006. Although he made a handful of first team squads for the Premier League giants, he did not make a senior first team appearance.

He was a regular on loan for Leicester City in the 2008-09 season, and was also loaned out to Accrington Stanley, Tranmere, Leeds and Derby before rejoining MK Dons in 2010, where he was Karl Robinson’s first signing after being appointed manager.