NEW YORK — It was far from pretty. In fact, it was pretty ugly.

The New York Jets squeaked out a 22-21 victory over the Miami Dolphins on Sunday that very nearly went the other way, if not for a few big plays, a game-altering pass interference call that was added after video review and a clutch kick — all in the closing moments.

The win prevented a two-game series sweep by the Dolphins and helped lessen the sting a bit of last week's embarrassing loss to the previously winless Cincinnati Bengals. Well, the Jets better clean things up in a hurry with Lamar Jackson and the surging Ravens hosting them Thursday night in Baltimore.

Jackson joined Michael Vick as the only quarterbacks to run for 1,000 yards in a season. And, he'll take on a Jets defence that has been stingy all season against the run, but gave up 65 yards rushing to Miami's Ryan Fitzpatrick.

“What we did (Sunday), I'm pretty sure he's watching the film and he's like, ‘Oh, I'm about to eat on these guys,' after we let Fitz escape how he did,” linebacker Jordan Jenkins said of Jackson. “That's something that we have to fix (Monday), short week."

The Jets are 5-8 and they've actually won four of their last five, with that loss at Cincinnati being the lone blemish — a big one at that.

Of course, New York hasn't exactly knocked off any of the league's titans, with wins over the lowly Giants, Redskins and Dolphins, and the mediocre Raiders in the last several weeks. The other victory was against Dallas, which also has a losing record now.

They have the Ravens, followed by a home game against Pittsburgh and then at Buffalo to wrap up the season — all teams fighting for playoff spots and positioning.

The Jets were officially eliminated from post-season contention Sunday night, but that hasn't diminished the team's goal for the last three games. Somehow, Adam Gase's group still has a chance to finish with a .500 record.

“We don't want to have a losing season,” wide receiver Vyncint Smith said. “We think we can beat anybody when we play well and play together."

WHAT'S WORKING

Despite Fitzpatrick's scrambles and giving up 122 yards rushing against the Dolphins, the Jets are No. 2 in rushing defence — down from No. 1 the past few weeks — while allowing 78.8 yards rushing per game. They'll face a major test Thursday night against the Ravens' top-ranked rushing offence.

Still, New York has allowed only one individual 100-yard rusher all season: Dallas' Ezekiel Elliott in Week 6.

WHAT NEEDS HELP

The secondary. The Jets simply need some healthy bodies.

Safety Jamal Adams missed the first game of his three-year NFL career with a sprained ankle, so cornerback Darryl Roberts started in his spot. Gase wouldn't rule Adams out against the Ravens. “I know where Jamal stands with it," the coach said. “We just have to make sure we do the right thing by him."

The cornerback spots have been a revolving door all season. With Brian Poole out with a concussion, Nate Hairston started in the nickel spot. Kyron Brown got his first NFL start opposite rookie Bless Austin, but was placed on injured reserve Monday after injuring his quadriceps. Arthur Maulet, who started the four previous games, was out with a calf injury.

STOCK UP

Sam Ficken. He kicked a 44-yard field goal as time expired to win it for the Jets, the longest walkoff kick in team history. He earlier missed an extra point, his second of the season, but also made field goals from 42 and 37 yards. He's 14 of 19 this season, including making seven of his last eight field goal tries.

STOCK DOWN

Le'Veon Bell. The star running back missed the game and several practices last week with the flu, but the Jets didn't miss a beat on the ground. In fact, they looked rejuvenated in some ways. Bilal Powell ran for 74 yards, a team high this season, on 19 carries, and Ty Montgomery had 31 yards on nine attempts. New York's 112 total yards rushing were just 3 off the season high set at Washington last month.

Bell was expected to rejoin the team for the players' weight-lifting sessions Monday night, and Gase sounded optimistic about the running back's chances of playing. It'll be interesting to see how Bell is used, especially if Powell is healthy after leaving late with an ankle injury.

INJURED

QB Sam Darnold said his right hand felt “great” a day after it was stepped on during the game. He said it's just bruised and didn't affect him against Miami. ... Poole, Maulet, Powell (ankle/illness), TE Ryan Griffin (ankle) and DL Quinnen Williams (neck) are uncertain to practice Tuesday. ... The team promoted WR Jeff Smith from the practice squad to take Brown's spot on the active roster and signed OL Brad Lundblade to the practice squad.

KEY NUMBER

0 for 6 — The Jets kept the Dolphins out of the end zone on six trips into the red zone, forcing Miami to settle for field goals by Jason Sanders throughout the day. New York became the fourth NFL team since 1991 to hold an opponent without a touchdown in at least six red-zone opportunities.

NEXT STEPS

The Jets opened as 14-1/2 point underdogs against the Ravens (11-2), and for good reason. Baltimore has its best record through 13 games in team history, has clinched a playoff spot and is on a franchise-best nine-game winning streak. It appears to be a massive mismatch on paper, and it's on Gase to keep it from getting that way on the field.

“Yeah, it's just one of those things where we have to play well as an offence," Gase said. “We can't be going three-and-out and giving them more opportunities than what they're already going to get."

___

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