Miles won a national championship at LSU but has been out of coaching since he was fired in September 2016. He turned 65 on Nov. 10.

Miles signed a five-year contract that will pay him $2,775,000 annually with retention bonuses of $775,000 due in November 2020 and $500,000 in November 2022.

"Since the beginning of our search, we focused on identifying and recruiting an experienced head coach with a track record of success on and off the field," Kansas athletic director Jeff Long said in a statement. "Les Miles is exactly what we need right now."

As the Kansas job closed on Sunday, the Colorado job came open. Athletic director Rick George announced that Mike MacIntyre, AP national coach of the year just two seasons ago when he led Colorado to 10 wins and a spot in the Pac-12 title game, was being let go. The Buffaloes started the season 5-0 and have lost six in a row.

"There's no doubt that the 2016 season was magical, and it appeared we were headed back to taking our place among the nation's elite," said George in a statement. "However, analyzing the direction of the program over the last two years, I felt this is the necessary time to make a change."

Miles is 142-55 in 15-plus seasons as a head coach at Oklahoma State and LSU. He won a Bowl Championship Series national championship in 2007 at LSU and played for another BCS title after the 2011 season. But a 21-0 loss to Alabama in that game was the beginning of a slow decline for LSU – at least by comparison to Alabama.

When Miles was fired early in the 2016 season after a loss at Auburn, the knock was that he had been unwilling to evolve offensively, sticking to a conventional power-based offense while most of college football – including rival Alabama – moved toward the fast-paced spread. While out of coaching, Miles has indicated he was ready to adjust to the changed offensive game.

East Carolina Pirates quarterback Holton Ahlers (12) scores on a touchdown run against Connecticut Huskies defensive back Tyler Coyle (25) during the first half at Dowdy-Ficklen Stadium. James Guillory, USA TODAY Sports

Ohio State Buckeyes running back J.K. Dobbins (2) leaps over the pile for a second-quarter touchdown against the Maryland Terrapins at Capital One Field at Maryland Stadium. Tommy Gilligan, USA TODAY Sports

Nov 17, 2018; Boulder, CO, USA; Members of the Colorado Buffaloes football team huddle on Folsom Field before the game against the Utah Utes. Mandatory Credit: Ron Chenoy-USA TODAY Sports Ron Chenoy, Ron Chenoy-USA TODAY Sports

North Carolina State Wolfpack running back Reggie Gallaspy II (25) dives over the goal line to score a touchdown against the Louisville Cardinals during the second quarter at Cardinal Stadium. Jamie Rhodes, USA TODAY Sports

Maryland Terrapins wide receiver Dontay Demus (7) catches a pass in from of Ohio State Buckeyes cornerback Kendall Sheffield (8) during the first quarter at Capital One Field at Maryland Stadium. Tommy Gilligan, USA TODAY Sports

Miles is taking on a difficult challenge. He will replace David Beaty, who is 4-31 in four seasons. The school announced earlier this month he would finish the season, but would not return as coach. After a 55-40 loss Saturday at No. 6 Oklahoma, the Jayhawks dropped to 3-8. The program has not had a winning season since 2008.

Last spring, Miles described his philosophy of winning in a difficult situation:

Last Thursday, LSU announced it had reached a settlement with Miles on his coaching buyout for a $1.5 million payment, which appeared to open up the possibility for the former coach to move into a new job.

Miles was 28-21 in four seasons at Oklahoma State from 2001-04, including 2-2 against rival Oklahoma. He is credited with helping to lay the foundation for Mike Gundy’s success at the school.