D’Brickashaw Ferguson didn’t wait for the NFL to be done with him. Instead, he said goodbye to the game on his own terms.

On Friday, a source confirmed the Freeport native and longtime Jets’ left tackle is retiring after 10 seasons at the age of 32.

Ferguson, the fourth overall pick in 2006, was a leader both on and off the field, traits that made him a respected figure in the locker room and around the NFL. Perhaps more impressive was his durability. He never missed a play because of injury in 167 games (including the regular season and playoffs), never missed a practice and never showed up on an injury report. And eventually, he will end up in the Jets’ Ring of Honor.

The news of Ferguson’s retirement stunned fans, but the Jets weren’t at all blindsided by his decision. Instead, they had been preparing for it behind the scenes.

According to sources, a member of the organization recently had a casual conversation with Ferguson about taking a pay cut. Though there is speculation that it was solely based on freeing up salary-cap space to re-sign free-agent quarterback Ryan Fitzpatrick, sources indicated that Ferguson’s age, declining performance and uncertainty over how much longer he’d play were behind their decision.

Ferguson was scheduled to earn a base salary of $8.625 million, plus several bonuses in 2016 that add up to a $14.1-million cap hit — the highest of any NFL offensive lineman. But his retirement saves the Jets $9.1 million in cap space.

Now they face the difficult task of finding his replacement. Possible options? Former Giants offensive lineman Will Beatty, who had surgery last year to repair a torn pectoral muscle and a rotator cuff. Another name that’s being floated is Ryan Clady, Denver’s four-time Pro Bowler who is coming off a torn knee ligament. So far, the Broncos have been unable to pull off a trade for the 29-year-old. Of course, the Jets could opt to address the tackle position during the draft later this month. (They pick at 20.)

Since being drafted, Ferguson played in 10,707 of the Jets’ 10,708 offensive snaps, according to ESPN. That one play was a last-ditch effort by the Jets in the waning seconds of a Week 17 loss to the Dolphins in 2008. Trailing 24-17 with seven seconds to go and with the ball on their own 7-yard line, they replaced their entire offensive line with skill players and ran an unsuccessful trick play with cornerback Darrelle Revis lining up at left tackle.

Ferguson played football at Freeport High School and received the Thorp Award, given to Nassau County’s best player, in 2000 before embarking on a standout career at Virginia. A decade and almost 11,000 snaps later, he’s now facing his next chapter: life after football.

Several Jets took to Twitter to express their feelings for their former teammate, including center Nick Mangold, who was drafted on the same day as Ferguson, at pick No. 29.

“Brick was a great Jet, teammate & professional,” Mangold tweeted. “He is an even better friend & man. Honored to be at every step of his journey #NYJ #2006.”

“I’m going to miss the word of the day . . . And also running my routes in peace knowing that Fitz was going to be OK. #Boss,” wide receiver Brandon Marshall tweeted.

“We will def miss you @DBrickashaw,” posted safety Calvin Pryor. “You meant a lot to us young guys in that locker room. Thanks for everything and more. #ForeverAJet”

Even Damon Harrison, who signed with the Giants during free agency, tweeted his appreciation for Ferguson. “Thank you brick!” wrote the nose tackle, whose locker stall was next to Ferguson’s at the Jets’ facility. “More than just a great football player, you are a great man! Showed me how to be a pro. A model of who we all strive to be.”