BUFFALO, N.Y. (AP) — A person familiar with discussions tells The Associated Press that Rex Ryan has agreed to coach the Buffalo Bills.

The person said the agreement was reached Sunday after the Bills extended the offer to the former New York Jets coach and he accepted. The person spoke on the condition of anonymity because the Bills have not announced the decision.

The agreement comes a day after Ryan had a second interview with the team in South Florida, where Bills new owners Terry and Kim Pegula live.

Ryan is staying in the AFC East, and will replace Doug Marrone, who abruptly opted out of the rest of his contract on Dec. 31.

More From 104.5 THE TEAM