It’s still early, of course, but Rex Ryan has already orchestrated quite a comeback with the Bills.

Ryan was assumed to be a goner less than a month ago after a 37-31 home loss to the Jets dropped Buffalo to 0-2, and he dumped offensive coordinator Greg Roman the next day.

But three weeks and three victories later, Ryan and the Bills are back from the dead and owners of a realistic chance of breaking the franchise’s 16-season playoff drought following a 30-19 drilling of the Rams on the road Sunday.

In fact, don’t concede the AFC East to the Patriots (again) just yet. With dates against the woeful 49ers and Dolphins next on the schedule, the Bills very well could be 5-2 when Tom Brady and New England visit Oct. 30.

That game could be even more pivotal to ending the Patriots’ dominance in the division because their only loss this year was to Ryan and the Bills in Foxborough, Mass., last week, a 16-0 decision in the final game of Brady’s Deflategate suspension.

Ironically, Buffalo’s surprising turnaround has been rooted in a vastly improved performance from its defense since that Week 2 loss to the Jets instead of a more potent offense since the switch to Anthony Lynn from Roman.

The Bills have been a turnover-forcing machine during their win streak with nine takeaways, including three in the victory over the Rams. Buffalo is now plus-nine in turnover margin, a figure that will take you a long way in the NFL. The Bills have gotten extremely stingy, too, and rank fifth in the league in scoring defense despite giving up 37 points to Gang Green.

Just as you would expect from a Ryan-coached team, that defense will have to carry Buffalo if the Bills hope to end the longest active postseason drought in the NFL.

Buffalo’s offense under Tyrod Taylor isn’t going to win any shootouts. Taylor isn’t making many mistakes (no turnovers in the past two games), but he isn’t taking many chances, either. Buffalo ranks last in the league in passing offense, averaging just 148 passing yards per game during its three-game winning streak after Taylor threw for a mere 112 yards against the Rams.

LeSean McCoy is much more reliable, which is why Ryan has decided to bring back his “Ground & Pound” approach from the Jets with Lynn calling the plays. After averaging just 76 rushing yards per game this year under Roman, the Bills are averaging 178.3 yards in three games with Lynn, including 193 yards against Los Angeles.

“I think a big deal is you’re seeing 11 guys out there playing as one,” Ryan said. “They don’t want to let each other down. We’re fighting like crazy, but they’re doing it for each other. It has nothing to do with individual glory and all that.

“I think we sold out to being a team, and that’s how we’re playing.”

Can they keep it up? Ryan’s recent track record — five consecutive non-playoff seasons — obviously isn’t very good in that regard. But their impressive early turnaround gives Bills fans something they haven’t had much of in almost 20 years: hope.