rex ryan

He's gone, but he's not going very far: Ex-Jets head coach Rex Ryan has agreed to become the head coach of the Bills, which means the Jets get to face him twice a year. (William Perlman | NJ Advance Media for NJ.com)

((William Perlman | NJ Advance Media for NJ.com))

The Jets aren't quite rid of Rex Ryan, everyone.

Oh, sure, the Jets fired Ryan and general manager John Idzik on Dec. 29. But Ryan is staying in the AFC East, and now the Jets get to face him twice a season. Hoo boy.

A person with knowledge of Ryan's thinking confirmed Sunday morning that Ryan has agreed to become the Bills' head coach. That person requested anonymity because he or she was not authorized to talk publicly on the matter.

Ian Rapoport of NFL Network had the Rex-Bills news first. And Kim Jones of NFL Network said Ryan is getting a five-year deal.

Ryan had coached the Jets for six seasons, compiling a 50-52 record (including playoffs) and too many mirthful moments to count. He had also interviewed with the 49ers and Falcons, but now he gets to lead one of the Jets' biggest rivals instead. Which is sort of incredible.

More:

I'm told Rex Ryan really liked Terry & Kim Pegula, who made clear they wanted him. Expect some members of his NYJ staff to join him in BUF. — Kimberly Jones (@KimJonesSports) January 11, 2015

DC Dennis Thurman is expected to join Bills. Rex expected to hire an OC who was not on his staff with NYJ. — Kimberly Jones (@KimJonesSports) January 11, 2015

The offer from the #Bills to Rex Ryan came late last night, source says. There was a thought the #Falcons would jump in. They did not. — Ian Rapoport (@RapSheet) January 11, 2015

Ryan had a second interview Saturday night with the Bills. Sounds like it was to work out a deal.

What about Ryan's coaching staff? Glad you asked.

The offensive coordinator Rex Ryan is most likely to bring with him to Buffalo is 49ers OC Greg Roman, per source. — Adam Schefter (@AdamSchefter) January 11, 2015

Ryan could also bring several Jets assistants with him in addition to Thurman, the Jets' defensive coordinator: According to Brian Costello of the New York Post, defensive backs coach Tim McDonald and assistant defensive line/linebackers coach Jeff Weeks, if not also defensive line coach Karl Dunbar, could also be headed to western New York.

One thing, though. Here's Vic Carucci of the Buffalo News:

The #Bills have "every intention" of keeping DC Jim Schwartz, just told by high-ranking team source. — Vic Carucci (@viccarucci) January 11, 2015

With the Bills, Ryan takes over a talented defense that finished 2014 second in defensive DVOA, behind the Seahawks, per Football Outsiders. But quarterback is going to be an issue: The Bills right now have E.J. Manuel; Manuel was the only quarterback drafted ahead of the Jets' Geno Smith in 2013, but he made just four starts last season after being benched for the since-retired Kyle Orton. And the Bills don't have a first-round pick in this year's draft; last year, they sent it to the Browns to they could trade up to draft receiver Sammy Watkins.

But that quarterback thing basically means Ryan is walking into the same sort of situation he had with the Jets. Who else wants odds on how long it takes Ryan to compare Manuel to Joe Montana?

rex ryan angry 9 Gallery: rex ryan angry

Dom Cosentino may be reached at dcosentino@njadvancemedia.com. Follow him on Twitter @domcosentino. Find NJ.com Jets on Facebook.