MIAMI, Fla. -- The 49ers traveled around the country to attend pro days of some of the top quarterback prospects in the country prior to the 2017 draft.

Mitchell Trubisky, Patrick Mahomes and Deshawn Watson were among those quarterbacks the 49ers scouted and visited. Each was chosen within the first dozen picks in the draft. But the 49ers, despite having a need at quarterback, were never all that interested in selecting a quarterback in the first round.

Nearly three years later, 49ers coach Kyle Shanahan said he studied Mahomes – but maybe not to the in-depth level required to uncover some of the traits that made him one of the top quarterbacks in the league.

“I didn’t look into him obviously as much as I should have,” Shanahan quipped on Tuesday, five days before the 49ers face Mahomes and the Kansas City Chiefs in Super Bowl LIV.

“We definitely looked into him and studied all of his tape, was just a freak, could make any throw, had the ability to do anything,” Shanahan said. “We had the second pick in the draft, and didn’t feel like with all the intel and stuff that he was going to go that high.”

Shanahan said he met with Mahomes at the NFL scouting combine. Mahomes remembers having dinner with 49ers general manager John Lynch and some other coaches later during the draft process. But Mahomes' memory is a little foggy. He said he never thought the 49ers would draft him because they already had Jimmy Garoppolo. That was one of Mahomes' few misfires of the postseason. Garoppolo did not come to the 49ers until the midpoint of the 2017 season.

The 49ers ended up trading back one spot to allow the Chicago Bears to select Trubisky. The 49ers took defensive tackle Solomon Thomas at No. 3 overall.

It was all part of the 49ers’ plan to build other areas of the roster and then wait a year to bring aboard a franchise quarterback. They figured that player would be Kirk Cousins, who was set to play under the franchise tag with Washington.

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

Shanahan believed the 49ers’ best move was to add a veteran quarterback the following year, rather than go with the unknown of bringing in a kid straight out of college.

“You saw a bunch of talented guys in that draft, but it’s very tough when you watch college systems and stuff, you don’t really know until you get somebody in the building,” Shanahan said. “You can see ability. You can see talent. But how’s the mind? How do they play in the pocket? How do they process? And 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’s always a risk with that when you spend a first-round pick on a quarterback.

“With the situation we were in, don’t want to be that risky, especially with the second pick in the draft.”

[RELATED: How Alex Smith helped Chiefs' Patrick Mahomes develop in rookie season]

After sitting behind former 49ers quarterback Alex Smith for the 2017 season, Mahomes has turned into one of the league’s best players and the star attraction at the Super Bowl. Mahomes won the NFL most valuable player award in 2018, in his first season as the Kansas City starter. He followed it up with an outstanding 2019 regular season and playoffs, leading into the game against the 49ers.

And the 49ers’ long-term plan to acquire Cousins came to an abrupt halt in late-October of 2017 when New England coach Bill Belichick called Shanahan to offer him Garoppolo for a second-round draft pick.

Neither the 49ers nor Chiefs have reason to complain about how things worked out.

Programming note: NBC Sports Bay Area feeds your hunger for 49ers Super Bowl coverage with special editions of “49ers Central” all week (8 p.m. Wednesday, 8:30 p.m. Thursday, 9:30 p.m. Friday, and 3 p.m. Saturday).

Also tune in at 1 p.m. on Super Bowl Sunday for a two-hour special of "49ers Pregame Live" with Laura Britt, Donte Whitner, Jeff Garcia, Ian Williams, Kelli Johnson, Greg Papa and Grant Liffmann. That same crew will have all the postgame reaction on "49ers Postgame Live," starting immediately after the game.