EAST RUTHERFORD, N.J. (CBSNewYork/AP) — The game appeared all but over and the Las Vegas Raiders were about to lose to the lowly New York Jets.

Derek Carr and his teammates refused to be embarrassed.

READ MORE: Campaign 2021: Early Voting Begins In New Jersey And New York City

Carr heaved a perfectly placed 46-yard touchdown pass to Henry Ruggs III with 5 seconds left, lifting the Raiders to a wild 31-28 victory over the still-winless Jets on Sunday.

“Once I looked back, it felt like the ball was in the air forever, like it couldn’t come down,” Ruggs said. “I just had to find it and make the play.”

The Jets took a 28-24 lead with 5:34 remaining on Ty Johnson’s 1-yard touchdown and the defense came up with a big fourth-down stop that appeared to end New York’s agonizing wait for its first win.

But New York went three-and-out with a chance to seal it — and Carr and the Raiders had 35 seconds left for what appeared an unlikely comeback. Four plays later, the Jets blitzed and Carr found Ruggs streaking downfield — beating rookie cornerback Lamar Jackson — for the winning score.

“I couldn’t believe they all-out blitzed us,” Carr said. “As soon as I saw it, I was thankful.”

It set off a wild celebration for the Raiders (7-5).

“It didn’t feel real to me,” said tight end Darren Waller, who had two touchdown catches. “I didn’t know what was going on. I sprinted full speed to Henry. … It was pandemonium on our sideline.”

Meanwhile, the deflated Jets (0-12) could only imagine what could — and maybe should — have been.

“Our players work way too hard to go through this (crap),” New York coach Adam Gase said.

After a squib kick by Las Vegas, the Jets had one final chance but Sam Darnold‘s Hail Mary throw was batted down in front of the end zone.

“It’s heartbreaking,” said Johnson, who ran for a career-high 104 yards and a touchdown for the Jets.

Carr threw for 381 yards and three touchdown passes, and ran for another score. Waller had 13 catches for 200 yards, becoming the 12th tight end since the 1970 merger with 150 or more yards receiving and two or more TD catches in a game.

Clelin Ferrell had two strip-sacks in his return from the COVID-19 list as Las Vegas bounced back from a blowout loss to Atlanta last week to stay in the middle of the AFC playoff hunt.

Barely.

“It was so hard to really enjoy it because the game was so much a sway of emotions the whole game,” Ferrell said. “I know the Raiders fans were really, really trippin’ the whole game. Up and down, up and down — it was crazy.”

On the drive before the winning possession, it appeared the Raiders had the go-ahead touchdown on fourth down when Hunter Renfrow caught a pass in the end zone — but the teams had offsetting penalties. Given one more chance, Carr’s pass to Nelson Agholor fell just short in the end zone and the defense raced off the field, arms raised in celebration.

READ MORE: NYPD: 23-Year-Old Charged With Murder Of Delivery Worker Stabbed To Death During Lower East Side Robbery

But it was only momentary jubilation.

The lowly Jets lost their 12th straight and tied the team mark for longest overall skid, which spanned the 1995 and ’96 seasons under Rich Kotite. New York remains on pace to join the 2008 Detroit Lions and 2017 Cleveland Browns as the only NFL teams to go 0-16.

“We should’ve won,” said Darnold, who had three turnovers.

Darnold ran it in from 4 yards to cap a run-heavy 96-yard touchdown drive that began the Jets’ fourth-quarter comeback. A pass-interference penalty gave the Jets another chance at a 2-point conversion, and Darnold threw to Denzel Mims to get the Jets within 24-21 with 10:22 left.

The Jets got the ball right back three plays later when Javelin Guidry forced the ball out of Ruggs’ hands after a 12-yard catch and Marcus Maye recovered.

New York took advantage with an 18-yard catch by Griffin sandwiched by a few runs — and a personal foul on Ferrell — to put the ball at the 1. Johnson pushed his way up the middle for the go-ahead score with 5:34 left.

STARTING STRONG

Darnold capped an opening 12-play, 74-yard drive with a 3-yard touchdown toss to Jamison Crowder. It was the struggling quarterback’s first TD pass since Week 3, a span that included two two-game stints on the sideline with shoulder injuries.

It also marked the sixth straight game the Jets scored on their opening drive.

Darnold put the Jets on top 13-7 early in the second quarter with another TD toss to Crowder, this time from 6 yards out. It was the first time Darnold had at least two touchdown passes in a game since Dec. 12, 2019, against Baltimore.

INJURIES

Raiders: CB Damon Arnette suffered a concussion in the first quarter when his helmet connected with that of Jets RB Frank Gore. … S Jeff Heath left in the fourth quarter to be evaluated for a concussion.

Jets: Gore also left with a concussion on the collision with Arnette. … RG Greg Van Roten left with a foot injury in the first half and didn’t return. … S Ashtyn Davis left with an injured foot.

UP NEXT

Raiders: host Philip Rivers and the Indianapolis Colts next Sunday.

Jets: travel to Seattle to take on the Seahawks next Sunday.

MORE NEWS: Parts Of Cross Island Parkway To Close Sunday For LIRR Work Near UBS Arena

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)