The Buffalo Bills have reached an agreement to hire Sean McDermott to be their next head coach.

The deal was reached Wednesday, shortly after the Bills interviewed McDermott for a second time in eight days. The 42-year-old has no previous head-coaching experience and spent past six seasons working as the Carolina Panthers defensive coordinator.

McDermott replaces Rex Ryan, who was fired two weeks ago. He becomes the team's ninth head coach since 1999, when Buffalo last made the playoffs under Wade Phillips. The Bills went 7-9 this past season, extending the NFL's longest active playoff drought to 17 years.

McDermott has 18 seasons of NFL experience, spending his first 12 years with the Philadelphia Eagles. He started as a scouting co-ordinator for two years, then mentored under late defensive co-ordinator Jim Johnson. He eventually succeeded Johnson in 2009.

He takes over a team in Buffalo that featured the NFL's top running attack but an underperforming defence in two seasons under Ryan.

The Bills defence finished 19th in yards allowed two years straight, and was particularly porous against the run. Buffalo allowed 200-plus yards rushing to opposing running backs three times this season, including twice against Miami's Jay Ajayi.

The offence was inconsistent at times under second-year starter Tyrod Taylor.

Owner Terry Pegula grew so dissatisfied with the defensive meltdowns, he fired Ryan in the week leading up to Buffalo's final game. Ryan was replaced by offensive co-ordinator Anthony Lynn, who served as interim coach in a season-ending loss to the New York Jets.

Lynn was one of three other candidates to interview for the job besides McDermott.

In 2015, McDermott oversaw a unit that forced an NFL-leading 39 takeaways and ranked second in yards allowed. The Panthers team went 15-1 and lost to Denver in the Super Bowl.

Joseph takes reins in Denver

A runner-up two years ago, Vance Joseph is John Elway's pick for head coach of the Denver Broncos this time around.

Joseph impressed Elway in 2015 when Gary Kubiak got the job. He was on Elway's short list when Kubiak, 55, stepped down last week over health concerns after Denver (9-7) missed the playoffs a year after winning Super Bowl 50.

"Becoming head coach of the Denver Broncos is a dream job for many reasons," Joseph said in a statement. "The Broncos have an unbelievable winning tradition and great fan support. But what makes this even more special is it's a place that's ready to win.

"This is not a rebuilding situation — it's a reboot. There is a culture of winning here, and the standards around here won't change. Those are to win championships."

Joseph, the 44-year-old ex-University of Colorado quarterback, spent last season as Miami's defensive coordinator after building a reputation as one of the league's top secondary coaches.

After interviewing Tuesday, Joseph returned to Broncos headquarters Wednesday after scuttling plans to fly to California to interview with the Chargers, 49ers and Rams.