Sam Darnold had the ball and the game in his hands, exactly what Adam Gase wanted, exactly what MetLife Stadium wanted, exactly what he himself wanted.

These are the times when you define yourself as a franchise quarterback, when you are having a bad day at the office and then you choke off a colossal choke and go win the game at the end and get everyone talking about that second-year leap you are poised to make.

A 16-0 lead had stunningly become a Same Old Jets 17-16 deficit because:

The brain trust foolishly trusts some place-kicker named Kaare Vedvik not to miss a PAT, not to mention a 45-yard field goal, because defensive coordinator Gregg Williams should be more worried about his pass rush (one sack on 37 Josh Allen attempts), because cornerback Darryl Roberts surprised no one by surrendering a 38-yard TD bomb to John Brown, because Gang Green was infected with gangrene once linebacker C.J. Mosley’s groin wouldn’t allow him to play the fourth quarter.

So Darnold had his dream chance to make right all that had gone wrong, for himself and everybody else, when he found himself at his 25 with three minutes and two timeouts left.

Gase, the play-caller and quarterback whisperer, and the young franchise quarterback, taking flight together at last on opening day.

“We had the ball in our hands to go win the game … that’s what we wanted,” Gase said. “The entire, really, training camp, I kept saying, ‘I hope we’re in a situation where we’re either down or up and we gotta go win it, or stop ’em.’ ”

And so an entire stadium pleaded:

Go win it, Sam.

And Sam couldn’t, Sam didn’t.

“I think we just couldn’t really get in a rhythm,” Darnold said after Bills 17, Jets 16, “and I put that on myself.”

And it stung.

“Whenever you get the opportunity to go out there and try to get a two-minute drive at home, it’s something special, it’s always special to do that,” Darnold said. “Just didn’t come out on top this time.”

It was third-and-1 when deep threat Robby Anderson broke open.

And Darnold (28-41, 175 yards) underthrew him. And Levi Wallace was able to break it up.

“It was underthrown, could have put it out there for him,” Darnold said.

Le’Veon Bell’s hard running (60 yards on 17 carries) got the longest yard on fourth-and-1, and then Darnold overthrew Anderson on an illegal-use-of-hands penalty against Jerry Hughes.

“Those last couple of throws there at the end,” Darnold said, “I wish I would have had back.”

Then Jamison Crowder zigged when Darnold expected him to zag and third-and-10 became fourth-and-10 and fourth-and-10 became game over.

“It’s a two-way go,” Darnold said, “it was just a miscommunication,” and Crowder sang the same sad song.

Darnold’s lone 9-yard TD pass was a shoestring catch by Bell (six catches, 32 receiving yards), which preceded the two-point conversion to Bell that made it 16-0 midway through the third quarter.

On a day when Darnold’s longest completion was for 19 yards to underneath slot receiver Crowder (14 catches, 99 yards), the 41-21 pass-run ratio was out of whack.

“When our defense forces four turnovers, and we don’t have any as an offense, we need to win the ballgame,” Darnold said.

“Our back seven did a tremendous job of making [Darnold] double-clutch the ball,” Hughes said.

You can argue that the game was lost in the first half when Darnold and Vedvik & Co. put up a goose egg at a time when the Bills were imploding with a pair of Allen interceptions and a pair of lost fumbles.

“When the defense is rolling like that, we gotta be able to do something on offense,” Gase said. “When we got in the second half, they probably had too many plays because we weren’t doing enough on offense. And that’s where we gotta play complementary football.”

Darnold (four sacks) was sabotaged by a handful of passes deflected at the line of scrimmage behind an offensive line that struggled.

Asked about Darnold, Gase said simply: “We have room for improvement.”

The choke’s on them, only no one was laughing.