Derek Carr threw a 46-yard touchdown pass to rookie Henry Ruggs III with five seconds remaining to rally the Las Vegas Raiders to a 31-28 victory over the New York Jets on Sunday afternoon in East Rutherford, N.J.

Ruggs, whose fumble earlier in the fourth quarter set up the go-ahead score for New York (0-12), ran past cornerback Lamar Jackson on a stop-and-go route up the left sideline for the game-winner to hand the Jets a franchise record-tying 12th consecutive loss. The Jets also lost 12 in a row from Dec. 3, 1995 to Oct. 20, 1996.

Tight end Darren Waller caught 13 passes for 200 yards and two touchdowns, with Carr throwing for 381 yards and three touchdowns and rushing for another score as the Raiders (7-5) snapped a two-game losing streak.

Defensive end Clelin Ferrell, back after missing two games with COVID-19, had a pair of strip-sacks to go along with six tackles, and Trayvon Mullen added a one-handed interception for Las Vegas.

Sam Darnold was 14-for-23 passing for 186 yards and two touchdowns but lost two fumbles and also threw an interception for the Jets, who lost starting running back Frank Gore on the second offensive play of the game to a concussion. Ty Johnson finished with 104 yards and a touchdown on 22 carries and Jamison Crowder caught five passes for 47 yards and two touchdowns.

Trailing 24-13 in the fourth quarter, the Jets cut it to 24-21 with 10:22 left on Darnold’s 4-yard run off right tackle and a two-point conversion from Darnold to Denzel Mims. New York got the ball back three plays later when Javelin Guidry forced a Ruggs fumble and Marcus Maye recovered at the Las Vegas 44. Six plays later, Johnson scored on a 1-yard run up the middle to give the Jets a 28-24 lead.

New York appeared to seal the win when Carr underthrew Nelson Agholor in the end zone on fourth-and-3 at the Jets’ 9-yard line with 1:42 remaining. But the Raiders got the ball back on their own 39 with 25 seconds left and no timeouts after forcing a three-and-out. Three plays later, Carr hit Ruggs for the game-winner.