Jim McElwain won SEC coach of the year honors in 2015. (John Raoux/Associated Press)

A tough week for Jim McElwain ended with the coach being let go by the University of Florida. The school announced Sunday that it and McElwain had “mutually agreed to part ways.”

Florida also announced that defensive coordinator Randy Shannon was promoted to interim head coach. A former head coach at Miami, Shannon led the Hurricanes to a 28-22 record from 2007 to 2010.

“We want to thank Coach McElwain for his efforts in leading the Gator football program,” Athletic Director Scott Stricklin said. “We are confident Coach Shannon will provide the proper guidance to the players and rest of staff during this time and we will begin a national search for the next head coach.”

“The two parties are currently negotiating terms of separation,” the Gators’ University Athletic Association said in a news release.

According to reports this week, Florida administrators had been looking into the possibility of firing McElwain with cause, which would let the school avoid paying the 55-year-old coach the full amount, $12.75 million, left on his contract. On Monday, McElwain had said that Gators players and family members had received death threats amid a disappointing start to the season, but the school announced that it could find no substantiation for those claims.

Florida fell to 3-4 and 3-3 in SEC play on Saturday, after being throttled, 42-7, by No. 3 Georgia.

McElwain has acknowledged that he was brought to Gainesville in December 2014 to “fix the offense” and that he has not been successful in getting consistent performances out of that oft-sputtering unit. “At the end of the day, we were all brought here to win, and we haven’t done it,” he said after the loss to the Bulldogs.

However, McElwain won division titles in his first two seasons with Florida, becoming the first coach to do so since the conference went to a title-game format, and he was named the 2015 SEC coach of the year. In addition, his 19 wins (against eight losses) in 2015 and 2016 tied Steve Spurrier for the second-most in Gators history over a coach’s first two campaigns.

Nevertheless, McElwain began the week on thin ice in the hypercompetitive SEC, and his claims of death threats reportedly made his situation far more tenuous. Stricklin denied Saturday that the school had “any conversations” with the coach or his representatives “regarding a buyout of his contract,” but those talks have now begun.

McElwain was the offensive coordinator at Alabama from 2008 to 2011 before he got his first head coaching job, at Colorado State. He led the Rams to a 22-16 record and a bowl win in three seasons, winning Mountain West coach of the year honors in 2014, then was hired by Florida to replace Will Muschamp.

Read more from The Post:

Campus Cleanup: Only the luckiest people get to live in Ames, Iowa

In shocking Penn State, Ohio State and J.T. Barrett refused to let go

College football winners and losers: Penn State must hope it’s this year’s Ohio State

Dartmouth assistant tossed for smashing window in coaches’ box during loss to Harvard