Les Miles has finally been done in by one of the frantic finishes that came to define the Mad Hatter’s tenure at LSU.

LSU fired Miles and offensive coordinator Cam Cameron on Sunday, and promoted defensive line coach Ed Orgeron to interim head coach.

The moves came less than 24 hours after Miles briefly watched his players wildly celebrate what they thought was a game-winning touchdown pass at Auburn, only to walk off the field with a stunning, 18-13 upset loss after officials determined on video replay that time had expired before the ball was snapped.

It wasn’t the first time chaos reigned in the closing seconds of an LSU game with Miles at the helm, leading to intense scrutiny of the quirky coach’s clock management. But it will go down as the last after 11-plus seasons that were highlighted by a 2007 national title. It will also be the last time Miles can be blamed for untimely bouts of stagnation by an offense that seems to have too much talent to be stifled as it has for significant stretches.

“Coach Miles has done a tremendous job here and he’s been a great ambassador for our University, which makes this even more difficult,” LSU athletic director Joe Alleva said in a written statement. “However, it’s apparent in evaluating the program through the first month of the season that a change has to be made.

“We have an obligation to our student-athletes to put them in the best position to have success on the football field each week. We have great confidence that coach Orgeron will do just that.”

Miles’ firing came hours after LSU (2-2, 1-1 Southeastern Conference), which was ranked 18th last week, dropped out of the Top 25 in the latest AP Poll released Sunday.

The 62-year-old coach did not speak publicly about his dismissal, which came more than three seasons before his contract was due to expire at the end of 2019. Miles is paid about $4.3 million annually and although it is unclear whether he’ll get all of what he would have been owed in his buyout.

Several LSU players said Miles was given an opportunity to say goodbye to the team on Sunday evening as the formal transition to Orgeron’s interim regime took place.

“He told us to keep fighting,” safety Jamal Adams said. “Coach Miles gave it his all every day. He is so passionate about LSU. Coach Miles definitely cares about you as a human being. I hurt for coach.”

Junior running back Leonard Fournette, a Heisman Trophy candidate who is expected to turn pro after this season, said he was “very shocked” by the decision and “hated” the way the team’s unexpected early season stumbles precipitated Miles’ firing.

“Coach Miles loves us. We had some great memories with him,” Fournette said. “He is one hell of a coach. Of course, you feel some guilt after him getting fired. At the same time, I understand this is a business.”

Receiver Travin Dural said Miles “almost broke down,” while delivering a touching speech, and added, “You could tell he loved the team.”

Miles, who replaced Nick Saban in 2005, went 114-34 at LSU, the second-most victories in school history behind Charles McClendon’s 137 victories from 1962 to 1979.

Cameron, an old friend of Miles from when they were both assistants at Michigan in the 1980s, joined LSU in 2013. His offense was effective when his quarterback was Zach Mettenberger, a tall, strong-armed, pro-style pocket passer. Production was far less consistent — and the passing game was often anemic — during the past two seasons.

The 2011 Tigers were one victory away from going down as LSU’s best squad in more than a century of football. But after winning its first 13 games, LSU lost in the national title game to Alabama in what has grown to a five-game losing streak against the Crimson Tide.

Since the start of the 2013, LSU has gone 15-11 against SEC opponents. LSU’s recent struggles nearly led to Miles’ firing last season, when the latest loss to Alabama began the first three-game skid of Miles’ tenure at LSU and the Tigers once again faded from contention. But after the Tigers rallied to close the regular season with a home win over Texas A&M, Alleva announced that Miles would return.

With a slew of starters returning on both offense and defense, this season was widely seen as a referendum on Miles’ long-term future. LSU was ranked No. 5 in the preseason, but opened with a close loss to Wisconsin at Lambeau Field.

Miles tried to give the offense a lift during LSU’s second game against Jacksonville State, when he replaced season-opening starting quarterback Brandon Harris with Danny Etling. Etling led LSU to victories in that game and against Mississippi State, but managed only 118 yards passing in the loss at Auburn.

Orgeron, known by players as “Coach O,” is a Louisiana native and renowned recruiter. He was a head coach once before in the SEC with Mississippi, but never had a winning record there and was fired after three seasons. He fared better as interim head coach at Southern California in 2013, going 6-2 in place of Lane Kiffin, who’d been fired that season.

“Coach O brings new energy. He is pumped up. I am excited to play for coach O,” center Ethan Pocic said. “It’s not easy. College football is a business. The best thing I can do is do whatever coach O asks us. He’s our coach now.”

AP college football website: www.collegefootball.ap.org