EAST RUTHERFORD, N.J. (AP) -- Rex Ryan's return to the Meadowlands was a successful one -- thanks to his pride and joy, the defense.
Buffalo's defense shut down Ryan's former team for much of Thursday night, and the Bills scored on offense and special teams in a 22-17 victory over the New York Jets.
More from FoxSports
Duke Williams returned a fumbled kickoff 19 yards for the go-ahead points, rookie Karlos Williams had a 26-yard touchdown catch and Dan Carpenter kicked three field goals. Buffalo (5-4) moved into the wild-card playoff picture, while the Jets (5-4) have lost three of their last four games.
Ryan was fired by the Jets after six seasons and immediately hired by Buffalo last January. His defense, had two interceptions, recovered a fumble and stopped the Jets inside the Bills 10 in the final minutes -- prompting some vigorous fist pumps Ryan repeated, along with a flying headset, when Bacarri Rambo clinched it with a last-minute pick.
"Our guys stood on their heads and held them out of the end zone," said Ryan, who did not come out to the field during pregame warmups. "It felt weird. Two things dawned on me that I am no longer the coach of the Jets: I was looking at the wrong side of the sheet when we were getting stats, and I spent six years coaching in green and white, and I look out there and my team is in red."
Buffalo's offense made just enough key plays and held off a late surge by the Jets after Ryan Fitzpatrick threw for two touchdowns.
The "Rexception" before the game was tame, with some boos, a few cheers, nothing over the top. The loudest catcalls came when former Jets defensive end IK Enemkpali, chosen by Ryan as a team captain for the game, came out for the coin toss. Enemkpali infamously broke Jets quarterback Geno Smith's jaw with a punch during the preseason, was cut and claimed the next day by Buffalo.
Hardly a wallflower, Ryan, wearing a red vest, almost was lost on the sideline among his players in their garish scarlet uniforms. And the fans seemed to forget about him once the action began.
"I saw everyone waving `Happy Day,'" Ryan joked.
That early action was dominated by some fierce defense. New York's blitzes kept Bills quarterback Tyrod Taylor off-balance, and Buffalo got its first three points thanks to Corey Graham's interception off a bobble by Jets receiver Brandon Marshall. Carpenter kicked a 47-yard field goal to make it 3-3.
Duke Williams added to that immediately, scooping up a fumble by rookie Devin Smith on the first kickoff return of his career. Williams scooted 9 yards for a 9-3 lead, but Carpenter missed the extra point wide left.
Carpenter added a 41-yard field goal to make 12-3 at halftime, then kicked a 29-yarder midway in the third period after Chris Ivory's fumble. New York's turnover issued completely turned the game in Buffalo's favor.
That field goal followed rookie Karlos Williams's 26-yard TD reception on the first series of the second half. Williams became the second player in NFL history with a touchdown in each of his first six games, joining New England's Robert Edwards (1998).
The Jets finally held onto the ball long enough to get something going, an 80-yard drive capped by Marshall's 14-yard scoring catch to make it 22-10. That woke up the crowd, and New York forced a three-and-out.
When New York reached the Buffalo 20, though, it eschewed a field goal and tried a strange pass to Marshall well behind the line of scrimmage on fourth-and-2. He was well covered and thrown for a 2-yard loss, then limped off, but returned on the Jets' next series.
Fitzpatrick hit Eric Decker for a 31-yard touchdown with 7:23 remaining, then got another golden chance a couple minutes later when Buffalo punter Colton Schmidt bobbled a snap and was tackled at his 13. But Ryan's defense held.
NOTES: Jets RB Zac Stacy broke his left ankle at the end of the first half on a kickoff return. ... Bills DE Mario Williams spent most of the game sidelined with what the team called an illness. Ryan said Williams was "sick as a dog" and needed an IV. ... Bills LB Nigel Bradham left in the third quarter with a cut on his nose after his helmet flew off while tackling Ivory, but soon returned. ... Buffalo RB LeSean McCoy rushed for 112 yards and had 47 yards receiving. Ivory ran for 99 yards.