NEW YORK (AP) — Chan Gailey is returning to the NFL to run the New York Jets' offense.

The former Dallas and Buffalo head coach will be the Jets' offensive coordinator under new coach Todd Bowles, according to a person with knowledge of the situation.

Gailey was out of football the last two seasons after being fired as the Bills' coach after the 2012 season. But Bowles, who was hired by the Jets on Wednesday, is making him a part of his staff in New York.

The person spoke to The Associated Press on condition of anonymity because the team has not announced the hiring.

The 63-year-old Gailey replaces Marty Mornhinweg as the Jets' offensive coordinator after New York struggled with consistency, particularly with quarterback Geno Smith, on offense. The Jets finished 22nd in overall offense this season, but were last in the NFL in passing.

"He'll try to put Geno, if he is indeed the guy, in a position where he'll be playing with a lot of confidence," said former Steelers coach Bill Cowher, who had Gailey on his staff for four seasons. "That's what I like about Chan, is his ability to be flexible and get the players to understand and, at the same time, believe in what they're doing."

Along with Bowles and new general manager Mike Maccagnan, hired Tuesday, Gailey will try to upgrade the offense and determine whether the Jets will move forward with Smith or perhaps look elsewhere in free agency or the draft.

"I have great respect for him," Cowher, now a studio analyst for CBS, said in a telephone interview with The Associated Press. "I think he's a very good playcaller. He knows how to get the very best out of what he has. He's not married to a certain system. I think the biggest thing with Chan is that he's got diversity."

Gailey has had several coaching stops at the college and NFL levels, including serving as head coach at Troy State, Samford, Georgia Tech and in the World League. In addition to being Cowher's offensive coordinator for two of his four seasons in Pittsburgh, Gailey was in the same role under Dan Reeves in Denver, Dave Wannstedt in Miami and Herm Edwards in Kansas City.

While his head coaching record of 34-46 — 18-14 in Dallas and 16-32 in Buffalo — might not excite Jets fans, Gailey's work with offenses is still very much respected around the NFL. And, the two-year layoff is of no concern to Cowher.

"Chan has been in the game long enough," Cowher said. "For a first-time head coach, there are things that will come up that you have never experienced before, and Chan has been there. He's selfless, he's loyal and I think he'll be a great resource to Todd, in particular on his side of the ball while he takes care of what he's going to do on his side of the ball."

___

AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFL