Stuart Thurgood has had his Gillingham contract terminated by mutual consent.
The 27-year-old midfielder was one of manager Mark Stimson's first signings when he took over in November 2007.
Arriving from Grays, Thurgood initially impressed but after a bright start to his Gills career, he soon lost his place in the starting XI.
After 12 appearances for the Gills last season, he returned to Grays on loan in March, and then agreed a season-long move back to the Blue Square Premier outfit in the summer.
But he has now ended his contract at Priestfield - which was due to expire this summer - and has agreed a permanent return to Grays on a deal until the end of the season with a view to another year.
Winger Tyrone Berry, who was released by the Gills in September, has also joined Grays on non-contract terms after being a free agent since his departure from Priestfield.