The Giants were on their way to a win over the Jets last Sunday at MetLife Stadium until they weren’t — an 80-yard drive for a field goal with 4:24 left; a 71-yard Jets drive for a touchdown with 27 seconds left; a 61-yard Jets drive to a field goal in OT; Odell Beckham Jr.’s penalty for kicking the ball back after an incompletion as the Giants attempted to tie it in OT.

Prince Amukamara saw that penalty from the sideline and was thinking more bad thoughts: “Man, it’s happening again.”

Yes, it was. Josh Brown ended up missing a field goal for the first time this season. The Giants had come from ahead to lose again. The defense really melted down.

“We’re just not making the plays we’re supposed to make,” Amukamara said after practice Friday. “It can be psychological. Like I’m not going to lie. I think it’s natural if it’s in the fourth quarter and we’re up and then something goes wrong, in my head I’m probably replaying like, ‘Man, I’ve seen this story a couple of times. I hope it doesn’t end [badly again].’ ”

The defense has specialized in a particular brand of turnovers — turning over late leads. The Giants have lost their edge five times in the final two minutes, leading to defeats.

Yet at least the unit’s chinstraps aren’t dragging on the turf. The will still seems to be there. The way seems more elusive. The team may be 5-7, but the Giants are tied for first in the NFC Least, make that East, heading into their Monday Night Football game in Miami.

“From what I see, our defense is still fired up,” said Amukamara, who was beaten by Brandon Marshall for a TD that led to overtime. “We’re still clicking. Everyone’s united and everyone’s really just excited to show out on Monday.”

advertisement | advertise on newsday

The Giants have had a 10-point cushion three times in the fourth quarter and lost, including the Jets game. Another loss came after they blew a seven-point advantage in the fourth.

“The common denominator is we need to make one more play,” defensive coordinator Steve Spagnuolo said. “That’s an easy answer. We’re always digging and always changing, quite frankly, trying something different.”

The Giants have surrendered 296 points. Nearly 40 percent, 116 of them, have come in the fourth quarter or OT.

“Not a good sign in a lot of ways,” Spagnuolo said.

Unless it can slow the air assaults, the NFL’s worst-ranked pass defense is on course to become known as the worst in NFL history when it comes to average yardage allowed. No team has surrendered an average of 300 passing yards per game in a full season. The Giants are at 314.5.

Giants videos

“I don’t think that’s really been talked about in our defensive room,” Amukamara said. “I think the main thing we’re trying to do is what Coach Spags always says — just stop one offense every week and everything will take care of itself.”

The Giants stand second to last in the NFL with 15 sacks. The pass rush is perhaps their biggest issue. Jason Pierre-Paul has no sacks in his four games.

“I felt better about our pass rush because whatever side Jason was on, he played a better game,” Tom Coughlin said.

Would the defense have melted this many times if JPP hadn’t had the fireworks accident and missed the first eight games?

“I guess we’re never going to know,” Spagnuolo said, “but I think anybody standing here thinks he would’ve made a difference.”

advertisement | advertise on newsday

The offense and special teams have had partial ownership of the late losses, too. For instance, Coughlin passed on a field goal at the Jets’ 4-yard line that would have put the Giants up 13 in the fourth quarter. Instead, Eli Manning’s pass was intercepted.

The perception is that the Giants just aren’t good enough. Coughlin’s counter to that is: “If we can be ahead at the end of three quarters, then finish the game and win the game. We have to be good enough.”