FLORHAM PARK, N.J. — The New York Jets have ended their 23-day search for a general manager, hiring Philadelphia Eagles vice president of player personnel Joe Douglas — an ally of new coach Adam Gase’s.

New York is giving Douglas a six-year deal, a source told ESPN’s Adam Schefter on Friday.

Douglas, 42, will be the Jets’ fourth GM in the past eight years, replacing Mike Maccagnan, who was fired May 15 after a power struggle with Gase.

The Jets hope Douglas can galvanize an organization in turmoil in the aftermath of Maccagnan’s surprising ouster. This could be awkward for Douglas because the perception is that Gase, who served as the interim GM, is calling the shots.

Technically, Gase and Douglas both will report to CEO Christopher Johnson — the same power structure as the previous regime. Just as Maccagnan did, Douglas will control the 53-man roster and will have final say on the draft and free agency, according to the Jets.

Douglas was the heavy favorite from the outset, in part because of his connection to Gase. They worked together with the Chicago Bears in 2015 and remained friends. The Douglas speculation began swirling before the draft, when rumors about Maccagnan’s job security started leaking.

The Jets interviewed four known candidates for the position — Douglas, Seattle Seahawks co-director of player personnel Scott Fitterer, Bears assistant director of player personnel Champ Kelly and New Orleans Saints director of pro scouting Terry Fontenot.

The Jets just would not take “no” as an answer from Douglas, a source told Schefter. Douglas tried to turn down the job and each time he did, the team came back at him harder and harder and simply were not going to be denied in their efforts to land him.

They wined and dined Douglas on Saturday night, with another meeting Sunday, before offering him the job.

Douglas inherits a promising young quarterback in Sam Darnold, but he still faces plenty of challenges. The Jets haven’t posted a winning season since 2015 and they haven’t reached the playoffs since 2010. The roster includes a small core of talented players, led by Pro Bowl safety Jamal Adams, but there are many deficiencies.

The cap situation is fine for a year or two, but it could get messy when Maccagnan’s recent big-money signings — namely, running back Le’Veon Bell and linebacker C.J. Mosley — reach the second and third years of their contracts.

Douglas has no previous GM experience, but he’s regarded in league circles as an up-and-comer. He spent the past three seasons as Howie Roseman’s right-hand man in the Eagles’ front office, running the personnel department and managing the scouts. Eagles sources say he played a key role in the 2017 Super Bow championship, yet many said they believe Douglas was ready to leave.

He presided over three drafts with the Eagles. The 2017 and 2018 drafts lack star power and have produced only two starters, defensive end Derek Barnett and tight end Dallas Goedert, but a handful of players could emerge as key contributors this season. It’s important to remember the Eagles lacked draft capital because of the trade for Carson Wentz in 2016.

Douglas grew up in the Baltimore Ravens‘ organization, starting out as a low-level personnel assistant in 2000 and working his way up to national scout in 2015. Realizing he had no shot at the GM position — Eric DeCosta was tabbed as Ozzie Newsome’s heir apparent — Douglas moved to the Bears and Eagles.