To track where it all went wrong for Jim McElwain at Florida, you have to go back to the beginning, to his first few days as the Gator coach when he got a look around at his new surroundings.

To say he was less than pleased would be an understatement. And because it had been his style to be direct in getting what he wanted, it didn’t always sit well with all University Athletic Association employees when he was.

McElwain groused privately that he wouldn’t have taken the job or would have at least had a better contract if he knew how poor the facilities and infrastructure were. He closed ranks and went to work trying to fix what he saw as a huge mess.

One of his early edicts — and an example of his vision that no outsiders would be allowed — was to kick the media out of the team meeting room where all news conferences were held since the days of Steve Spurrier.

Even before his first season, there was a feeling among the people he worked with that it was hard to get a grip on where McElwain was coming from. There was an almost-Nick Saban arrogance about him (hidden behind a pseudo-affable front) without the track record to back it up.

That included an awkward first meeting with all of the Gator head coaches where his efforts to be glib and folksy came off as insulting and condescending. To some, it felt like Team Florida was now only a shallow motto.

Whether he didn’t get Florida or Florida didn’t get him depended on your perspective.

But then came that first season when McElwain’s Gators started winning despite having a patchwork offensive line and a redshirt freshman quarterback thanks to the same killer defense that had been the trademark of the previous regime.

If you want to find the high point of the Jim McElwain Era at Florida, it was that perfect October night in 2015 when the Gators throttled third-ranked Ole Miss 38-10.

A week later they handled Missouri on the road and found themselves ranked — when the AP poll came out on Sunday — in the top 10. They also found something else that Sunday — that quarterback Will Grier had tested positive for a banned substance and would be suspended for the rest of the season and the first half of the next one.

McElwain was stunned by the news.

“You have 30-something guys who take the test and for some reason they always test the quarterback,” he said. “And he’s the one guy you don’t worry about.”

This, looking back, was the turning point in McElwain’s Gator career. His 2015 team was able to punch out just enough close wins to take the SEC East, but lost its final three games. The Gators won the East the next year, but again were humiliated by Florida State and Alabama at the end of the season.

There was the record before the suspension of Grier — 6-0 — and after the suspension — 16-12. The losses always felt worse than the wins felt good.

But there was much more.

If you were to highlight the many comments that raised the eyebrows of his bosses, you would certainly start with the Outback Bowl postgame in 2017. Scott Stricklin, still fresh on the job as athletic director, and the collection of media in Tampa heard the coach say this after beating Iowa 30-3:

“We’ll look for the commitment that we get from the administration moving forward, see where that’s at.”

This was after Stricklin had met with McElwain and told him of the plans for a contract extension, his vision for the new football operations building and other financial commitments.

It didn’t get any better a month later when McElwain was feeling his oats on National Signing Day and responded to a question about fans being upset when it looked like UF’s class was in trouble.

“Every coach who has been here before me is aware of it. Might have driven a couple of them out of here.”

That was a direct shot at a fervent fan base. So was this response to a similar question — “We don’t know what we’re doing.”

That kind of condescending attitude didn’t win McElwain many friends outside of the football offices.

This summer, there was an uneasy tension in the stadium that houses the football and UAA offices. No matter how many times McElwain was told “yes”, it never seemed to be appreciated.

And, strangely, the more he received, the less he felt appreciated.

Still, there were high hopes for the 2017 football season. McElwain talked about knocking the door down in Atlanta even though the Gators were not picked to win their division.

In a meeting with several members of the national college football media in a private room at the Wynfrey Hotel at SEC Media Days in Hoover, Ala., McElwain said something again that caught the attention of the administration.

Most of the interview was positive as he talked about how so many people in the football offices now shared his vision. But he couldn’t let the day go without another shot at the fans.

“Maybe, some day, people might think we’re OK.”

And then, another shot fired across the administration’s bow.

“We finally opened our eyes to the fact that nobody invested less money than Florida in the SEC since 2005.”

True or not, Florida had won two national titles during that time and has just invested millions in academics and facilities for athletes with more to come. It felt like a body blow and certainly didn’t feel like everyone was in this Team Florida thing together.

Then, bad things started to happen that crippled the football team.

On July 11, strong safety Marcell Harris was one of Florida’s reps at SEC Media Days. Eight days later, his season was over after a torn Achilles injury.

Less than a month later, seven players were suspended from the team because of credit card fraud. Two weeks later, two more were caught in the trap.

While nobody expects coaches to know every move a player makes, these were still McElwain recruits giving Florida a bad name and sending national media members into a frenzy about the Florida culture.

Then came Michigan. McElwain had bragged about his offensive line all summer and it was handled like it was runny oatmeal in the game. The disconnection between the Gator fan base and its coach reached Defcon 3.

After a game lost to a hurricane and some odd news conferences by McElwain where he seemed almost beaten down by all of the bad news, Florida rallied.

After the amazing win over Tennessee, Florida won from behind at Kentucky. In the locker room after the game — a place where McElwain was never shy about being bawdy and crude with his players — he told his team this:

“Remember at the end of the day, it’s still bleeping Kentucky.”

In the corner of the room, Stricklin’s eyes went down to his phone to pretend to be reading something, according to someone in the room. What the heck was that?

When the unsustainable penchant for winning close ones went the other way, Florida’s season was at a crossroads.

That’s when McElwain made the fateful slip that was the light to the pile of kindling he already had tossed into the fire pit.

He talked of death threats, tried to blow it off, walked it back eventually, but it was the perfect out for UF. He had either conjured up the death threats or violated policy.

Either way, it sped up an already rolling snowball.

The 42-7 loss to Georgia just made it easier on the fan base. No matter what happened in that game, the problem wasn’t going to change.

For a lot of Florida fans, it felt like something that had almost come out of nowhere.

In reality, it had been brewing for a long time.

Contact Pat Dooley at 352-374-5053 or at pat.dooley@gvillesun.com. And follow at Twitter.com/Pat_Dooley.