SANTA CLARA, Calif. (AP) — It's hard to know who took the bigger risk.
Was it the team, the Denver Broncos, who were hiring a coach with recent health problems and a penchant for not maxing out talent?
Or was it the coach, Gary Kubiak, who signed on with a team that had just fired a coach with a winning record because he came short of the only goal that mattered — capturing the Super Bowl?
Turns out, it wasn't such a risk.
The coach, hired by his loyal friend John Elway, changed his ways, in part because he couldn't keep up the pace that caused him to have a mini-stroke while he was coaching the Houston Texans.
The team, now built on defense and nowhere near as dependent on Peyton Manning, is a win away from its first title in 17 years.
"The hot seat Gary stepped into was hotter than any seat in the league," Elway said.
Elway said he recognized the coach Kubiak might be someday from the time they both joined the Broncos, after the 1983 draft. The two quarterbacks were roommates, who talked a lot of football in between the endless loop of "Andy Griffith" and "Gilligan's Island" reruns on their TV.
"Very bright, a very hard worker, a great offensive mind," Elway said.
All that said, this was a hiring that only made sense in Denver.
The Broncos had parted ways with John Fox, who went 49-22 and took the team to four straight playoff appearances, only to flop big-time in season finales. Denver was outscored 150-66 in those four games.
Kubiak, meanwhile, could've been easily perceived as damaged goods. Not so much because of the health scare that marred the last of his eight seasons with the Texans — or even the 11-game losing streak in 2013 that led to his dismissal.
There were just as many questions about 2011 and 2012, when Houston was loaded and started the season with Super Bowl expectations, but struggled at the end, losing three straight to close out 2011 and three of four in 2012, en route to early playoff exits.
"Did I think I would get another opportunity? I don't know," Kubiak said. "But I knew I loved the work."
To do it, though, he would have to change. He'd have to delegate more. The scene on the field during a November 2013 game against Indianapolis — Kubiak collapsed and was taken off on a stretcher — made clear how the stress had taken its toll.
"I kind of ran myself into the ground a little bit," Kubiak said.
Instead of taking a year off, Kubiak went to Baltimore. In one season offensive coordinator, he helped Joe Flacco have his most productive season. Then, the Broncos made their move.
Elway wanted teams that, even if they lost, would go down "kicking and screaming." It was the way he played. Nobody understood that better than Kubiak, who backed him up for nine years, then worked with him as Denver's offensive coordinator for four more, including when the Broncos won Super Bowls in 1998 and '99.
Elway also wanted to plan for life after Manning.
The Broncos VP went about building a team centered on defense and running. Would it be as exciting as the 2013 team that scored a record 606 points behind a record 55 touchdown passes from its Hall of Fame-worthy quarterback? Of course not.
"You've got to have great defense to have a chance to win it all," said Mike Shanahan, the former Broncos coach who worked with Kubiak for years. "That's what football's all about, and Gary knows that."
Kubiak's first delicate task was to build an offense that would mesh his style — zone running, bootlegs, QBs under center — with what was comfortable for Manning, who was more of a shotgun, throw-all-the-time player. It wasn't perfect. The last four of Manning's career-high 17 interceptions came on a day in which the quarterback shouldn't have been playing because of an ever-worsening foot injury. Kubiak pulled Manning from the game, then took the blame for letting Manning talk him into playing.
Manning spent six weeks on the bench, with Kubiak keeping everyone — Manning, new starter Brock Osweiler, the entire locker room — aware of the decisions being made.
"We were always the first to know what the deal was," said tight end Owen Daniels, who has followed Kubiak to every place he's coached. "That took away distractions."
Manning's return to the lineup — off a gut feeling Kubiak got when the Broncos committed five turnovers, none of them really Osweiler's fault, in their regular-season finale — was the final piece of the puzzle.
The Broncos played defense-first, ball-control football in the playoffs. They won two close games, and find themselves one win away from the title they couldn't win under the previous coaching staff.
"Gary kept them focused on a common goal," Shanahan said. "It's not always easy to do."
AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFL