Ed Werder breaks down the news that Gary Kubiak tells players he will step down as coach due to health reasons and looks ahead to the Broncos' coach search. (2:34)

DENVER -- In what players described as an emotional scene after the Denver Broncos' 24-6 victory over the Oakland Raiders on Sunday, coach Gary Kubiak told his team he was stepping down for health reasons.

Kubiak had told a small, tight-knit group of team officials earlier in the week, but he did not tell the players or the coaching staff until after Sunday's regular-season finale. Following the game, many players lined up to hug Kubiak as he went around the locker room.

"There some emotion -- I've got a lot invested in this place,'' Kubiak said. "You guys know how much I love this place.''

"It's definitely sad to see him go -- we won the Super Bowl with him,'' said cornerback Chris Harris Jr. "It's just sad to see him go.''

Kubiak has spent 22 years with the Broncos, including his nine years as a player, 11 years as the offensive coordinator on Mike Shanahan's staff and the last two seasons as head coach. Kubiak went 21-11 in those two seasons with a win in Super Bowl 50 last February.

Kubiak has been on the team's coaching staff for all three of the franchise's Super Bowl wins. He held back his plans all through the week, and players and coaches arriving before Sunday's game against the Raiders said Kubiak had not let on in the team meeting Saturday night.

Kubiak was asked after the win over the Raiders to specifically address his plans, but he deferred to Monday.

"I did talk to the team, right now ... I'll address my situation [Monday], but I had a real good moment with the players and told them how proud I was of them,'' Kubiak said. "I'll address everything else [Monday] ... It's about the football team right now -- it's not about me.''

Moments later, Kubiak did allow that "I struggled this year.'' The Broncos were 7-3 at their bye week but lost a Week 12 game to the Kansas City Chiefs as they went 2-4 down the stretch to miss the playoffs for the first time since 2010.

"The first thing I really thought about ... if it was true, it was probably his health,'' Broncos wide receiver Demaryius Thomas said. "He had some issues this year, but it was an emotional moment.''

Kubiak had spent a night in the hospital after the Broncos' Oct. 9 loss to the Atlanta Falcons and left the stadium that night in an ambulance. He was diagnosed with a "complex migraine condition'' and was away from the team for a week following his hospital stay and did not coach the team in its Oct. 13 game in San Diego.

Kubiak has said multiple times since he was trying to improve his sleep habits and had consistently deflected health questions in the weeks that followed.

Kubiak also suffered what was called a "mini-stroke'' in 2014 when he was coach of the Houston Texans.

Even as recently as Friday, Kubiak was asked about his plans for next season and acted as if he felt good enough to coach in 2017, but he stopped short of definitively saying he would do it.

"Why? Do I look bad?'' Kubiak said Friday with a smile when asked about the 2017 season. "You guys know, I love this league, I love the Broncos, I love the work. I'm all-in on the Raiders right now. There will be time for reflection and all that stuff next week.''

As the clock wound down in Sunday's win for the Broncos, the crowd inside the stadium chanted "Ga-ry, Ga-ry'' over and over. He has been a popular figure with the team as a player, a trusted assistant and a championship-winning coach.

"Everybody was shocked and didn't believe it,'' Harris said. "... It's hard to leave a job when it's your dream job.''

"We love Kubes, we love the way he treated us,'' said cornerback Aqib Talib. "... I'm praying that he gets healthy.''