MIAMI GARDENS, Fla.— Let’s get this out of the way first: Miami beats Georgia Tech if coach Mario Cristobal had ordered his offense to take a knee. His decision to opt against the victory formation and run a play gave the Yellow Jackets an opportunity to steal a game.

No one could believe it. Not the Yellow Jackets, not the salty Hurricanes fans at Hard Rock Stadium and perhaps not even Cristobal himself. The Jackets still had to seize the chance, though, and they did it.

Haynes King’s 44-yard touchdown pass to Christian Leary with one second left sent Tech to a wild 23-20 victory.

“It wasn’t everybody’s best (game) but, oh my God, the grit that this team has, the fight that we have at the end, it’s just amazing,” King said.

After sputtering on offense all night, the Jackets had to go 74 yards in less than 30 seconds to score the winning touchdown. They were in the game because their defense held Miami’s explosive offense to a season low in points. Cristobal’s blunder will overshadow all that, but it shouldn’t.

A week after losing at home to Bowling Green as three-touchdown favorites, the Jackets (3-3, 2-1 ACC) beat the No. 17 team on the road as three-touchdown underdogs. The Hurricanes were undefeated. They’d still be undefeated if Cristobal had accepted the victory.

Miami faced a third-and-10 with less than a minute left. Tech had no timeouts. Cristobal could have run out the clock.

“We kind of thought that he was taking the knee at that point,” Tech coach Brent Key said.

“Honestly, I was a little surprised that they ran the ball,” said Tech defensive back K.J. Wallace. “Obviously, that’s their choice.”

The choice made no sense. Miami running back Donald Chaney Jr. took the handoff and surged forward. Tech linebacker Paul Moala pried the ball from Chaney just before his elbow touched the ground. Teammate Kyle Kennard recovered the fumble at Tech’s 26-yard line.

Cristobal offered a convoluted explanation of his reasons for running the play before getting to the crux of the matter.

“We should have taken a knee,” Cristobal told reporters.

The Jackets are glad the Hurricanes didn’t.

On the winning play, King got flushed out of the pocket.

“I look back and see Haynes roll right,” Leary said. “That’s when I flipped my hips and went to the back pylon. The ball’s already in the air. I knew I had to catch this one.”

He caught it, then ran in for the score that stunned Miami fans who were close to celebrating a victory.

“I usually have a pretty good recollection of the game,” Tech coach Brent Key said. “What did Will Ferrell say in (the movie) ‘Old School?’ ‘I think I just blacked out.’ That’s what I felt like right then.”

The Jackets didn’t play well offensively. They came alive when they got one final chance and made sure the defense’s great night didn’t go to waste. The Hurricanes entered the game as the ACC leader in points scored per game. They barely squeezed out a field goal against Tech before halftime and scored fewer than 38 points for the first time this season.

Miami quarterback Tyler Van Dyke’s passing accuracy and decision-making were off all game. He fluttered a few passes when he needed to zip them and put the ball in danger by throwing late into tight coverage. Van Dyke led the ACC in completion percentage (74.4%) and had one interception in 99 attempts. Against Tech, Van Dyke was 24 of 36 (66.6%) with three interceptions.

The Jackets couldn’t take full advantage of Van Dyke’s struggles because their offense was going nowhere. They gained 80 yards on 27 plays over six drives with four three-and-outs, including the first possession after halftime. Miami started the drive at the 50-yard line after a shanked punt and penalty by Tech. That’s when Tech’s defense finally broke: Miami wide receiver Riley Williams scored on a 22-yard catch-and-run eight plays later for a 10-0 lead.

The Jackets started their next drive at their own 25-yard line. They’d given no indication they could drive the field. Scoring twice seemed out of the question. Tech was facing a third straight three-and-out after two plays gained just four yards. The Jackets desperately needed a play. Dominick Blaylock provided it.

Blaylock slipped behind Miami’s defense and Haynes King found him for a 34-yard gain to Miami’s 37. A roughing-the-passer penalty against Miami moved Tech to the 22. King ran for 14 yards on the next play to set up a first-and-goal. Luke Benson popped open on second down from the 1, but King missed him. A false start pushed Tech back five yards before King ran in for a touchdown.

The Jackets trailed by just three points late in the third quarter. They’d take the lead after Ahmari Harvey intercepted Van Dyke’s pass and returned it 16 yards to Miami’s 26-yard line. Tech’s Jamal Haynes ran for 16 yards on the next play. On third-and-goal at the four, Haynes muscled his way into the end zone to put Tech ahead 14-10.

The Jackets led going into the fourth quarter despite not generating much offense. The defense was carrying them. That group made another winning play when Jaylon King picked off Van Dyke’s pass at Tech’s 15-yard line and returned it to Miami’s 15. The Jackets couldn’t gain a first down, but Aidan Birr made a 27-yard field goal to push Tech’s advantage to 17-10 with 12:11 left.

The Jackets were on the verge of an upset. But King tried passing into an area with multiple Miami defenders. One of them, safety James Williams, caught King’s pass and ran 44 yards to Tech’s 14-yard line. The Jackets held Miami to a field goal, but then went three-and-out again. The Hurricanes bled the clock by gaining three first downs, one of them by penalty.

Then came Cristobal’s mystifying decision to run a play when taking a knee would mean victory, giving the Jackets a chance to snatch it away.