GAINESVILLE — A season that held so much promise has turned in a nightmare of a script.

Barring a win over in-state rival Florida State next week, a Gators team pegged as a preseason sleeper national championship contender by reputable analysts like Phil Steele may finish with the program’s second-worst record since a winless 1979 campaign.

A program that had played in two consecutive SEC Championship games is almost certainly not even going to play a bowl game this year.

A season that was supposed to be about a return to national prominence was, in many ways, over before it began.

Captain, All-SEC safety and defensive heartbeat Marcell Harris fell in July, lost for the year with an Achilles’ injury.

Beset by a credit card scandal that implicated nearly a tenth of the roster, Florida lost nine players before toe met leather in a much-anticipated season opener against Michigan. The Gators were crushed 33-17 in a game less competitive than the score.

Florida nipped Tennessee on the “Heave to Cleve,” and somehow extended its almost impossible to comprehend winning streak over Kentucky to 31 games. The Gators even beat Vanderbilt to improve to 3-1.

But the wheels came off in a winless October, as the toll of the suspensions, injuries and continued ineptitude at quarterback took their toll.

The head coach was gone by the end of October, fired in a cloud of controversy in the aftermath of a crushing loss to archrival Georgia.

A week later, the team quit on the field against Missouri, and with an improved South Carolina, a bowl eligible UAB and a wounded but talented FSU left to play, the remainder of the November schedule didn’t appear to offer much respite.

The Gators fought hard in Columbia, but a late rally came up short. With bowl eligibility all but an APR (academic progress rate) dream, what was there to play for anyway?

And who would play what was left on the schedule?

After all, by the time the Gators suited up to play the Blazers on Saturday in Gainesville, they had only 51 scholarship football players available to play. And that was before Kadarius Toney, one of the season’s few shining lights, was injured on the first drive. Even accounting for the suspensions, Florida’s injuries made the locker room and football facilities more of a MASH unit than proud football factory.

With the team severely short-handed, the head coach gone, bowl game hopes all but dead and an interim coaching staff polishing their resumes, it would have been easy for Florida to quit, shut it down this season until a new staff arrived. It would have been human, really.

There’s precedent for it in almost any sport. When things go sideways, it’s a natural inclination to look to the future, or look to future endeavors or seek out other opportunities. One foot in the door, the other well on the way out.

A loss to UAB would have been framed as rock-bottom, to be sure. But would it have truly surprised anyone?

Of course not. It would have just been the latest, and perhaps most cruel, insult in a season gone horribly wrong.

Florida had been down that road before, and capitulated against far lesser opponents than the Bill Clark led UAB team that entered The Swamp Saturday.

In 2013, Will Muschamp’s Gators team lost at home to then-FCS Georgia Southern, despite the Eagles not completing a single, solitary forward pass.

It was, in fact, rock bottom.

But it was also proof that no matter what front coaches put out in the press, and no matter what players suggest or spout on social media platforms, teams do, in fact, quit. That’s human.

Finding the collective will not to quit? Finding the character to keep going, to get better? That’s the hard part.

But that’s what Florida did Saturday.

Credit: Kim Klement-USA TODAY Sports

On a day when there was hardly anything at all to play for, the Gators played for each other. They played to get better. They played well to remind themselves that better days lie ahead, and are coming soon.

Winning is always sweet medicine, but it’s even sweeter when it’s an unexpected delicacy. And that’s what Saturday felt like. Because it didn’t matter that no matter how you spin the fine season UAB’s had, it’s still just a home win over a team from Conference USA.

The win revealed more than that.

It revealed, yet again, the character of Randy Shannon, Florida’s interim coach with the impeccable reputation as a molder of men.

Shannon’s career and life has been about defying adversity.

Shannon sometimes is out-coached. He’s sometimes out-recruited. He’s never outworked.

Instead of mailing it in, Shannon challenged the Gators to use the final month of the season to get better. He told the team to take pride in what it put on film, and even with thin numbers, has benched players who don’t. He’s preached accountability, and provided permanent captains to set a standard and provide a sounding board. He’s brought in guest speakers and Gator greats, like All-American and All-Pro Joe Haden, who addressed the Gators this week. Shannon has, by word and deed, kept working.

It showed Saturday.

Florida finished tackles, playing its best defense of the year against an explosive Blazers offense. Florida fit run gaps, holding a 1,000-plus yard running back in Spencer Brown to 17 yards. Florida produced four turnovers, giving its points and confidence-starved offense short fields early in the ball game until the run game found its footing late.

The Gators made mistakes. They settled for too many field goals, dropped too many passes, committed plenty of penalties and busted a coverage.

But they didn’t fail for lack of effort and they didn’t fail because they weren’t invested in getting better.

The 51 players available to play for the Gators got better Saturday, and that revealed a team with growing character.

What an asset that fighting spirit will be for whatever coach (cough, Chip Kelly, cough) takes the job.