Just weeks after Vince Wilfork asked for his release, the New England Patriots and one of their team captains have come to terms on a three-year, $22.5 million contract extension, according to NFL.com.

The agreement ends the most high-profile contract dispute of the NFL offseason, which pitted the league’s premiere franchise against one of its most beloved players.

“It’s been hard to remain quiet and let things take (their) course but it has been the best thing to do,” Wilfork tweeted.

“My intentions have never changed. 10 years ago my goal was to retire a Patriot and as I sit here typing this I am closer to achieving that goal. I look forward to getting back to football and helping my team compete and have a chance at winning the Super Bowl.”

Wilfork, 33, coming off a season-ending torn Achilles tendon, was set to make $7.5 million in 2014 – with a $11.6 million salary-cap charge – so the Patriots asked him during the offseason to rework his contract in hopes of acquiring more salary-cap flexibility.

The talks didn’t go well, leading to Wilfork asking for his release.

The Patriots never complied with the request, however, and three days ago, Patriots owner Robert Kraft said he was “still not giving up hope” the team could work out a new deal to keep the five-time Pro Bowl selection with New England.

Details of how the money will be spread out over the three years weren’t immediately available.

Last year was the first time in his 10-year career Wilfork missed a significant amount of time, but given his age, his weight and the serious nature of his Achilles injury, some experts have wondered aloud if he’ll be able to return to his All-Pro form.

Wilfork was the Patriots’ first-round draft pick in 2004, and has been a fixture in the community and a face of the organization.

The Patriots have appeared to upgrade their team this offseason, adding all-world cornerback Darrelle Revis, formerly of Tampa Bay, and acclaimed cornerback Brandon Browner of Seattle.

They also hope to have back Wilfork, linebacker Jerod Mayo and tight end Rob Gronkowski, who all missed most of last season – including the playoffs – with injuries.