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.

A source confirmed Friday that the Freeport native and longtime Jets left tackle is retiring at the age of 32 after 10 seasons.

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 even 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.

DataJets NFL draft history database

The news of Ferguson’s retirement stunned fans, but the Jets weren’t 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 would play were behind their decision.

Ferguson was set 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. His retirement saves the Jets $9.1 million in cap space.

advertisement | advertise on newsday

Now they face the difficult task of finding his replacement. The Jets’ contingency plan for replacing Ferguson includes a familiar face: free-agent tackle Ben Ijalana. A source confirmed Friday night that the Jets plan to re-sign Ijalana, Ferguson’s backup the past three seasons, to help address their offensive line needs. Former Giants offensive lineman Will Beatty and Ryan Clady, Denver’s four-time Pro Bowler, also have been floated as potential options. Beatty underwent surgery last year to repair a torn pectoral muscle and rotator cuff. Clady is coming off a torn knee ligament.

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 missed 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 left and with the ball at their 7-yard line, they replaced their entire offensive line with skill players — cornerback Darrelle Revis lined up at left tackle — and ran what proved to be an unsuccessful trick play.

Jets videos

Ferguson played football for 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.

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.”