Rex Ryan stomped up and down the Buffalo Bills’ sideline, pumping his fist and yelling all sorts of expletives in celebration of one of the most satisfying wins of his coaching career. Only moments later, he was standing in front of a microphone, entertaining the huddled media with one of his trademark post-victory press conferences.

The rambunctious head coach should have thanked his defense for making the loudest of statements Thursday night.

The Bills returned a fumble for a touchdown, turned the New York Jets over on downs twice in the fourth quarter and intercepted quarterback Ryan Fitzpatrick on the final drive to seal the 22-17 win.

Ryan can talk the talk, but it was his defense making all the noise when it mattered most. Buffalo forced four turnovers and five punts, and scored 12 of its 22 points off takeaways.

“We know coach Rex has all of our backs, and we go out and do the same for him,” said safety Bacarri Rambo, who made the final interception with 24 seconds left.

The Bills jumped out to a 9-3 lead when safety Duke Williams returned a fumble for a score off on a kickoff return in the second quarter. Later, the Jets comeback fizzled out when Buffalo slammed the door shut on two different fourth downs in the second half. Rookie cornerback Ronald Darby stopped Brandon Marshall on a quick screen to turn over the Jets, and Ryan’s defense made a goal line stand after a botched punt when Fitzpatrick’s fourth down pass fell incomplete in the end zone.

After the Jets got the ball back with under 30 seconds left, Rambo ended the game when he picked off Fitzpatrick near the sidelines.

Ryan was still celebrating on the sideline as Tyrod Taylor took a knee in the victory formation. In his first visit back to New York, the Buffalo head coach was leaving a winner.

The Bills are now 5-4 and in possession of one of the AFC’s wild card playoff spots. Buffalo will go on the road for four of its next five games, including next Sunday’s visit to New England.

Ryan will need his defense to travel well. The Bills finally have Taylor, LeSean McCoy and Sammy Watkins healthy on offense, but any Ryan team will only go as far as its defense. And on Thursday night, the Bills defense powered Buffalo’s biggest win of the 2015 season.

Ryan is can’t miss television on the sideline and an entertainer in front of the microphone. He also has a defense capable of backing up his unorthodox antics.