MIAMI — One of the most important decisions that got the 49ers to the Super Bowl didn’t come without hesitation from coach Kyle Shanahan.

Nearly 27 months since trading for Jimmy Garoppolo, Shanahan this week in Miami looked back on what his franchise quarterback went through during his crash-course half season when he came to San Francisco from the New England Patriots, changing the trajectory of a franchise toward championship contention.

“That, to me, is me is borderline impossible to do to someone no matter how good they are,” Shanahan said of Garoppolo’s quick integration after being traded, going 5-0 to as the starter to finish 2017 and parlaying it into a life-changing, five-year, $137.5 million contract despite never starting more than five games in a season.

But Shanahan’s faith in Garoppolo was seeded years earlier when he was the offensive coordinator with the Cleveland Browns. And he needed a starting quarterback.

XXX

Cleveland needed a starter, so Shanahan traveled to Chicago to work out Garoppolo at Northwestern University before the 2014 draft. But there was a hitch.

There weren’t receivers available to run routes and catch passes on that spring day 15 miles north of Chicago. Which meant Shanahan, a former college receiver at Texas and Duke, would have to run routes and catch passes himself as part of Garoppolo’s evaluation.

“Which was frustrating because he threw it too hard and I didn’t have gloves,” Shanahan said. “I remember the next few days that my hands were purple, but I feel like I caught most of them.”

Said Garoppolo: “Kyle was snagging passes, no gloves needed. So it was pretty impressive, bringing him back to his receiver days.”

Garoppolo was a late riser as a prospect. His name generated a modest amount of buzz leading up to the draft, but his rise wasn’t meteoric enough to go in the first round. After all, Garoppolo was coming from Eastern Illinois and he didn’t play in many high-profile games.

Shanahan’s team, meanwhile, decided to trade up four spots for Heisman Trophy winner Johnny Manziel with the No. 22 pick in Round 1 in a decision that was made above Shanahan. Manziel was marred by off-field issues and never played well enough to stick as a starter before getting released before his third season.

Garoppolo went to the Patriots in the second round with the No. 62 pick and he backed Tom Brady for 3½ seasons.

“Everyone in this league has their own story and how they get to where they’re going,” Garoppolo said while reflecting in Miami this week. “But just how everything worked out, I couldn’t be happier. Happy where I ended up, happy where I started. Just enjoying this ride.”

XXX

The first round of the 2017 draft had massive ramifications on this Super Bowl — and the 49ers’ journey there.

Shanahan knew one of his primary objectives after becoming head coach would be to find a franchise quarterback. But the No. 2 pick in the draft, in his opinion, was too rich for any of the signal callers in that class, which included Mitchell Trubisky, Deshaun Watson and Patrick Mahomes.

So Shanahan stuck with what he knew. The 49ers were going to make a run at Kirk Cousins in free agency the following offseason which meant Shanahan would focus on building up the defense in the earliest stage of his long-term plan.

“It was a little bit different situation for us,” Shanahan said. “I think it’s pretty well documented of just the relationship I had with Kirk and being in Washington and everything. And I felt very confident that he wasn’t going to stay there. So any time you go into a season knowing that a franchise quarterback’s going to be available the next year, it made me a lot more picky with what we were looking at.”

Trubisky had just one season as a starter at North Carolina before the Chicago Bears took him second overall after trading up one spot with San Francisco. The 49ers went with Stanford defensive lineman Solomon Thomas and traded back into Round 1 for linebacker Reuben Foster.

The Houston Texans traded up to No. 12 to take Watson two slots after Kansas City tapped Mahomes, who went earlier than many were expecting.

Mahomes has since become arguably the best quarterback in the NFL after throwing 50 touchdown passes and for 5,000 yards in his first full season as a starter. He benefited from sitting behind Alex Smith for a season while learning to play under one of the best offensive minds in a generation, Andy Reid.

Cousins, of course, was drafted while Shanahan was the offensive coordinator in Washington in 2012 and Shanahan knew what he had, which wasn’t necessarily true of the quarterbacks in the 2017 draft, none of whom looked like sure-fire stars. There’s roughly a 50% bust rate for quarterbacks taken in Round 1.

Would Shanahan have done things differently?

“I didn’t look into (Mahomes) obviously as much as I should have,” Shanahan said. “We definitely looked into him, studied all his tape. Just a freak. Could make any throw. Had the ability to do anything.”

But because Mahomes wasn’t asked to do much in his spread offensive system at Texas Tech, Shanahan wasn’t willing to take the risk.

“It’s very tough when you watch college systems and stuff, you don’t really know until you get someone in the building,” Shanahan said. “You can see it build. You can see talent. But, how’s the mind? How do they play in the pocket? How do they process? That’s not just an IQ score, that’s some stuff I don’t think you can totally test. You got to go through that with them. So there is always a risk with that when you spend a first-round pick on a quarterback. And with a situation we were in, didn’t want to be that risky.”

That risk aversion hasn’t aged well given Mahomes is clearly a better quarterback than Cousins, whom Shanahan beat in the first round of the playoffs with the Vikings. Though that would be a moot point if the 49ers can beat Mahomes and the Chiefs in the Super Bowl.

XXX

Shanahan was recovering from a beatdown his team took from the Philadelphia Eagles hours prior. The 49ers lost in Philly, 33-10, in a bad-weather game tattered with injuries.

Shanahan looked at his phone at roughly 5 a.m. to see a text message from Patriots coach Bill Belichick.

“And I thought he was texting me just to make me feel better,” Shanahan said. “But he said to give him a call if I had a second. And I called him, and he ran it by me. I wasn’t ready for it.”

The conversation centered around a trade for Garoppolo, whom the 49ers inquired about during the previous NFL combine only to be rebuked. Garoppolo wasn’t available, but that eventually changed because Garoppolo was heading toward free agency and New England wasn’t going to pay him to stick around as long as Tom Brady could still play.

“So it threw me off a little bit but I was definitely excited,” Shanahan said. “I told him I just had to talk to John (Lynch), hung up, called John upstairs, he came right down. We talked for about 10 minutes. We called back and said yes.”

The trade was Garoppolo for a second-round draft pick, which made sense given San Francisco slogged through the first half of the 2017 season struggling at quarterback. Journeyman Brian Hoyer broke training camp as the starter before he was replaced by rookie C.J. Beathard midway through Week 6. The trade was made official Oct. 31.

“I was getting ready for a Halloween party that night,” tight end George Kittle said. “I was dressing up as a pirate when I got the notification on my phone. It was just incredible. It’s just kind of a ‘holy cow.’ Jimmy Garoppolo, that chin line, finally making its way to the West Coast.”

But it was a risk because Garoppolo was heading towards free agency the next offseason. The 49ers had eight games to decide if Garoppolo was worth keeping, either on a long-term contract or the franchise tag, or eat the loss of a second-round draft pick and stick to the original plan by going after Cousins in free agency.

“Any time you go into a contract year like that, that’s a huge commitment,’ Shanahan said. “And it’s hard to make a judgment off people off of six weeks time when you’re committing that type of money, which I didn’t believe would be possible. That’s what I was nervous about.”

But Garoppolo impressed, helping the 49ers become the first team in history to finish 6-10 after starting 1-9 thanks to Garoppolo’s unbeaten run as the starter over the final five games. He missed more than 13 games the next season with a torn ACL, but he started all 18 this season while helping San Francisco get to the Super Bowl, where he’ll square off with Mahomes.

Shanahan’s decision to avoid risk and Mahomes in the 2017 draft led to take considerable risk in trading for Garoppolo and giving him a big contract. Now those two signal callers are squaring off in Super Bowl LIV.

“That’s how impressive Jimmy was,” Shanahan said. “He came in for six weeks, he won our team over, he won me over, I think we won our town over. All anyone has to do is watch the games he played in. After six weeks later, the decision was very easy.”