Not to get melodramatic, but a season was on the line. Georgia Tech had been outscored 28-3 over 19 minutes and 18 seconds. Duke, which hadn’t won an ACC game, had surged from three touchdowns behind into a stunning lead. Justin Thomas had been sacked on first down. It was second-and-19 at the Yellow Jackets’ 5 with eight minutes left.

Beating Duke isn’t apt to propel Tech to a New Year’s Six bowl, but losing to Duke might have doomed the Jackets to a second postseason with no bowl. So: Second-and-19 at the 5, Duke four points ahead, time flying. What to do?

Let your best player drop back to pass. Then watch him run.

For all the moments Thomas has authored in 2 1/2 seasons as Tech’s quarterback, this stands with the late touchdown pass against Georgia Southern, the fourth-and-15 completion at Virginia Tech and the scramble in Athens at the end of regulation. Those massive plays in breathless 2014 victories fueled the famous Orange Bowl run. What Thomas did Saturday was keep bowl hope alive.

Second-and-19. Duke brought pressure and drove Thomas deep into his end zone. When he stopped running, Tech had the ball at Duke’s 49. His 46-yard scramble galvanized the drive that yielded the Jackets’ winning touchdown, Thomas’ 21-pass to Clinton Lynch with 5:38 remaining. That made the score 38-35. It would end that way after Thomas …

Did the same darn thing again.

Tech’s defense, miracle of miracles, had forced Duke’s first punt since the Blue Devils’ opening possession. Thomas was sacked again. A false start made it third-and-17 at the Tech 21, 2:19 remaining. Again Thomas dropped to throw. Again he ran. This ramble spanned 50 yards and finally — finally! — sealed a victory that went from a rout to a rescue mission.

Thomas’ numbers — 197 yards rushing, 264 yards passing — were video-console stuff. So was the game itself. Tech mustered 605 yards, but it wasn’t until Thomas’ second scramble that the Jackets pulled ahead to stay, yardage-wise. Duke finished with 559, having scored touchdowns on four consecutive second-half possessions.

Afterward, Tech coach Paul Johnson ripped his defense and lauded his offense. (Both points were valid.) A media person mentioned that Duke had taken advantage of its tight end. Said Johnson: “What didn’t they take advantage of?”

Tech led 28-7 at the half, but it was a weird 28-7. Duke had outgained the Jackets. It had also lost two fumbles and was twice thwarted on fourth down. The Devils had 344 yards at the break without a snap inside the Tech 23. The Jackets had seven gains of 18 yards or longer, none via an option pitch or B-back dive.

“They were selling out to stop the run,” Johnson said, and Duke mostly achieved that mission — if you don’t count Thomas’ 197 yards. Johnson again: “They were forcing him to run the ball.”

This is the worst Duke team of the past four years, but it has had its moments. It beat Notre Dame 38-35 in South Bend. (The Fighting Irish fired defensive coordinator Brian VanGorder soon thereafter; Tech’s Ted Roof might want to step lightly.) It held Louisville to 24 points and Lamar Jackson to 325 total yards. There’s a real chance Duke will finish ACC play winless, but this was a necessary hurdle if Tech is to play beyond its 12th game. The Jackets can now become bowl-eligible by beating Virginia here Nov. 19.

Which isn’t to say the Jackets are incapable of winning again before then. If Thomas is having himself a day, he elevates a team. He did it in 2014. The Jackets weren’t half as good last season, and neither was he. Asked about his performance Saturday, he said: “I really feel like I should have been doing that all along.”

Johnson on Thomas: “He played very well today. He played good. He made plays.”

This was another example of Johnson being Johnson, but surely he realizes how much Thomas has meant to Tech — and to this curmudgeonly coach. If not for Thomas in 2014, Johnson wouldn’t have a contract that runs through 2020. If not for Thomas’ scrambles Saturday, a program coming off 3-9 might be 4-4 with three difficult road games left.

But it’s not. Tech is 5-3, having won a game it had to win. It’s 5-3, and its quarterback just had his greatest game since he was Orange Bowl MVP.

Of the second scramble, Thomas said: “They brought an extra guy (in the pass rush). I had to make him miss. There wasn’t anybody else on the perimeter.”

It sounds simple, but it wasn’t. Not many collegians could have made that play. Justin Thomas made it twice in one quarter. He saved a game, and maybe not just a game.