The New England Patriots have traded four-time Pro Bowl cornerback Stephon Gilmore to the Panthers for a 2023 sixth-round pick, Carolina announced Wednesday.

The trade comes after the Patriots and Gilmore could not agree to terms on a restructured contract, according to ESPN’s Adam Schefter, and both sides had said public farewells.

“We enjoyed so much success together and you have been an incredible inspiration for my individual achievements,” Gilmore wrote on Twitter. “… To Mr. [Robert] Kraft, the coaches, and the organization thank you for providing me with this platform and allowing me to be part of greatness. Most of all I want to thank my teammates who lined up next to me every Sunday with one goal in mind.”

Patriots coach Bill Belichick praised Gilmore in a statement as a “true professional and class act” and said the decision to move on from the cornerback was mutual.

Gilmore is recovering from surgery on a torn quad that he had in December. He is expected to be ready to play in the coming weeks.

ESPN’s Mike Reiss contributed to this report.