EAST RUTHERFORD, N.J. (AP) — Cam Newton and the New England Patriots appeared headed to a fifth straight loss — this one against the winless New York Jets, of all teams.

Then came the fourth quarter, and potential embarrassment turned into big-time relief.

Nick Folk kicked a 51-yard field goal as time expired to win it 30-27 on Monday night after Newton rallied the Patriots from a 10-point deficit to avoid the franchise's first five-game skid since 1995.

“It shows the character of this team,” said Rex Burkhead, who had a 1-yard touchdown run in the third quarter. “Just battling, fighting. It shows the strength we have. We’re not going to quit. We’re not going to lay down.”

Newton had two touchdown runs, with the second tying it at 27 with 1:57 remaining. He also brushed off his struggles of the past few weeks, including a fumble against Buffalo last week that sealed a loss.

“I’m getting tired of sucking," said Newton, who was 27 of 35 for 274 yards passing. "It’s simple. As a competitor, you know what your standard is. Taking pride in your work, that’s what it comes down to.”

After the Jets (0-9) went three-and-out for the first time all night, the Patriots (3-5) got the ball back with 47 seconds left and went to work.

Newton had a 5-yard run on third-and-1 from the New England 42 and then spiked the ball with 8 seconds remaining. He followed with a 20-yard pass to Jakobi Meyers to put Folk — who made several big kicks for the Jets from 2010-16 — in position for the winning field goal.

“I had a lot of good memories here at MetLife (Stadium),” said Folk, who had been dealing with a back injury. "I just added one to the other sideline tonight.”

Meanwhile, the Jets dropped to 0-9 for the first time in franchise history, and this was one was particularly agonizing.

“It’s a tough pill to swallow,” said wide receiver Jamison Crowder, whose 20-yard TD catch shortly before halftime gave the Jets a 20-10 lead. “That was a tough loss right there. That was a game we should’ve won.”

After Folk's 29-yarder with 6:04 left cut the Patriots' deficit to 27-20, quarterback Joe Flacco — having a solid night until that point while starting for an injured Sam Darnold — tried to put the game away.

Instead, he swayed the momentum in New England's favor.

Flacco's deep pass down the middle for Denzel Mims was picked off by J.C. Jackson. That set up Newton's tying TD — and deflated the Jets, who couldn't recover.

“I don't think I would've made a different decision in the moment,” Flacco said. “But, obviously, I'd like to have that one back.”

Flacco was 18 of 25 for 262 yards and three touchdown passes — two to Breshad Perriman and one to Crowder — but had the game-changing interception.

With the Patriots down by 10, Newton marched them down the field to open the second half, capping a 14-play drive with Burkhead’s 1-yard plunge into the end zone to make it 20-17.

But the Jets answered right back, with Flacco finding a wide-open Perriman in the end zone for a 15-yard touchdown and a 27-17 lead with 30 seconds left in the third quarter.

A miscue by the Jets on special teams kept the Patriots’ next drive alive.

After Newton stumbled on third-and-1 and was stopped for a 4-yard loss, New England appeared to have to settle for a 32-yard field goal. But the Jets were called for 12 men on the field — resulting in a first down for the Patriots. The defense made up for the mistake, getting a red-zone stop — with an assist from a holding penalty on New England right tackle Mike Onwenu — and holding the Patriots to a field goal to make it 27-20 with 6:04 left.

But New England got the ball right back when Flacco was picked off by Jackson, who has interceptions in four straight games.

With the Jets looking for a stop on third down, Bless Austin was called for defensive holding, keeping the drive alive.

Damien Harris ran for 21 yards to get New England into Jets territory. He followed with a 9-yard gain, but it was called back because of an offensive holding penalty on Meyers. Harris also took a big hit on the run and was down for several minutes before walking gingerly to the sideline.

Three plays later, Newton completed a 19-yard pass to Meyers and then ran for 3 yards on fourth-and-1. Newton hit Damiere Byrd for 31 yards to put the ball at the 3.

With a taxed Jets defense tiring, Newton ran for 2 yards on first down, was stopped for no gain and then pushed his way into the end zone for his second rushing TD of the game to tie it with 1:57 remaining.

“It was a good win," coach Bill Belichick said. "I thought we made the plays we needed to make at the end of the game. Certainly some things we can do better. But we played good complementary football at the end of the game.”

JOE PASSES JOE

Flacco passed Pro Football Hall of Famer Joe Montana (40,551) for 20th on the NFL's career yards passing list on his first TD pass to Perriman, a 50-yarder in the second quarter that put the Jets up 13-7. Flacco has thrown for 40,726 yards.

CATCHING ON

Meyers had 12 catches for a career-best 169 yards, joining Rob Gronkowski and Julian Edelman as the only Patriots players with 150 or more yards receiving in a game in the past five seasons.

INJURIES

Patriots: LT Isaiah Wynn left briefly in the first half with an ankle injury, but returned.

Jets: Rookie left tackle Mekhi Becton left in the first half with a chest injury, but coach Adam Gase was unsure if it was a torn pectoral. Cornerback Brian Poole was also ruled out at halftime after injuring a knee in the second quarter.

UP NEXT

Patriots: Host the Baltimore Ravens next Sunday night.

Jets: Bye week. New York is at the Los Angeles Chargers on Nov. 22.

___

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.