The New York Jets are running out of time in their race for a playoff spot.

They blew an opportunity to keep pace in the AFC hunt on Sunday when they gave up a late touchdown to Detroit and then coach Robert Saleh mismanaged the clock in the final moments of a 20-17 loss.

”I think I got about a half-hour’s worth of sleep last night,” Saleh said Monday. ”Not from a justification standpoint, but there’s stuff that I definitely could’ve done better.”

He’s not the only one. Far from it.

The Jets are 7-7 and on a three-game skid, with their once-promising postseason hopes now teetering on the brink of vanishing. And they have a quick turnaround, with a Thursday night showdown against the surging Jacksonville Jaguars (6-8).

”We’re not making the plays in the fourth quarter to win,” Saleh said. ”The good news is that we’re in these games and we’re putting ourselves in position to win. We’ve got to go back and find a way to recapture what we were doing in the first half of the season over the next stretch of games and and hopefully extend it.”

Zach Wilson, who had an up-and-down day in his return as the starting quarterback, completed an impressive drive with a 1-yard touchdown toss to C.J. Uzomah to give New York a 17-13 lead with 4:41 left.

But then the defense, which had been solid all game, blew it. With the Lions facing fourth-and-1, Jared Goff found a wide-open Brock Wright short and the tight end rumbled 51 yards to give Detroit the lead again with 1:49 remaining.

”It’s something that we should have had covered,” Saleh said. ”And if we do our job, we win the football game.”

The Jets still had a chance, though, especially with all three of their timeouts remaining.

On the fifth play of the drive, Wilson completed a 10-yard pass to Garrett Wilson to get to the Jets 48 with 49 seconds left – but Saleh let the clock run.

”This is the one where I definitely overthought the situation,” Saleh said. ”Felt like we got the better end of a spot and I was trying to beat New York (the NFL’s instant replay command center) on a challenge. … It didn’t matter. We’re not playing for downs at this situation. We’re playing for time. And when you look at it, I definitely probably cost us one more snap.”

The next play – an incompletion deep to Braxton Berrios – wasn’t snapped until there were 31 seconds remaining. Following a sack, Saleh finally called his first timeout. After another incompletion, Zach Wilson completed a 20-yard pass to Elijah Moore on fourth down, and Saleh called his second timeout – with 1 second left.

Kicker Greg Zuerlein was wide left on a potential tying 58-yarder, sending Saleh and the Jets to a frustrating loss.

”The biggest thing you want to do is give your guys a chance to make plays and just to give them – do your job, do your job – to give everybody a chance to make a play and just be the best version of themselves,” Saleh said. ”And in that situation, I definitely could have been better.”

WHAT’S WORKING

The cornerbacks. The play of rookie Sauce Gardner and veteran D.J Reed has been arguably the Jets’ brightest spot this season, regularly shutting down teams’ best receivers. Gardner, the No. 4 overall pick, was not targeted once by Detroit.

WHAT NEEDS HELP

The offensive line. It was another shaky performance for the big guys up front, who have been rocked by injuries and inconsistency. They’re not providing much time or protection for the QB the last few weeks, and the running game couldn’t get going Sunday.

”I can give you the empathetic woe-is-me card, but nobody cares,” Saleh said. ”We’ve got to be better.”

STOCK UP

Uzomah. The veteran tight end had his best game with the Jets, catching his first two touchdown passes of the season.

STOCK DOWN

RB Zonovan Knight. After three terrific games to start his NFL career, the undrafted rookie was held to 23 yards on 13 carries. Saleh said he’s questionable for Thursday with an ailing ankle, but ”his arrow is pointing up.”

INJURIES

Saleh said QB Mike White is still being evaluated for his fractured ribs and has ”a lot of hurdles that he would have to go through” to be able to play Thursday night. While Saleh wasn’t prepared to announce a starter, he said it would be Zach Wilson – and not Joe Flacco – if White can’t go. … The Jets are hopeful DT Quinnen Williams (calf) will be able to play after missing Sunday’s game. … WR Denzel Mims is in the concussion protocol, while WR Corey Davis might be cleared in time to play. … WR Jeff Smith (knee) and S Lamarcus Joyner (hip) will be questionable, while CB Brandin Echols (quadriceps) is out.

KEY NUMBER

67 – That’s how many receptions Garrett Wilson has this season, breaking Wayne Chrebet’s franchise record for rookies (66) set in 1995.

NEXT STEPS

The Jets have to push the loss aside quickly and prepare for Trevor Lawrence and the Jaguars, who have won their last two games to get into the AFC playoff race. The game could be a showdown between last year’s No. 1 overall pick (Lawrence) and the No. 2 selection (Zach Wilson).

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL