The San Francisco 49ers and Kansas City Chiefs will meet in Super Bowl 54 after an exciting pair of conference championship games. Both are storied franchises in their own right, but they share a unique connection.

For one reason or another, five starting-caliber quarterbacks have made their way from the 49ers to the Chiefs over the years. The highest-profile quarterback of the bunch is Joe Montana and the most recent example is Alex Smith.

A sixth quarterback, Bob Gagliano, went the other way, from Kansas City to San Francisco.

These quarterbacks have ranged from the legendary to the utterly forgettable, and we’ve put them in five handy tiers below.

The Legendary Tier

Joe Montana

13 years with 49ers (100-39, 14-5 in playoffs)

2 years with Chiefs (17-8, 2-2 in playoffs)

Montana was a four-time Super Bowl champion, three-time Super Bowl MVP, two-time league MVP, and possibly the greatest quarterback in Super Bowl history. He is one of the most important figures in 49ers history, which is why it’s kind of mind-blowing that he was eventually traded to the Chiefs in favor of up-and-comer Steve Young.

There wasn’t any bad blood that led to Montana being dealt to the Chiefs after 13 years with the 49ers. There was simply a young gun waiting in the wings at the tail end of Montana’s career.

Still, imagine if the Patriots traded Tom Brady a couple years ago because they were excited about Jimmy Garoppolo — even if it made sense, it would still shock the sporting world.

Young got significant playing time with the 49ers when Montana went down with an elbow injury that forced him to miss the entire 1991 season and most of 1992 as well. Young looked like the future of the 49ers, so when Montana was healthy in 1993, he was traded to the Chiefs.

The 49ers wound up winning a Super Bowl with Young during the 1994 season, while Montana got to work with Kansas City. In 1993, he led the Chiefs to their first division win since 1971, making his eighth and final Pro Bowl in the process. That year, the Chiefs advanced to the AFC Championship, but an injury took Montana out in the third quarter of a 30-13 loss to the Bills.

The following season, Montana got the Chiefs back to the playoffs. A wild card loss to Dan Marino and the Dolphins was Montana’s final game, however. He announced his retirement that offseason. He was later elected to the Pro Football Hall of Fame in his first year of eligibility.

The Deserved Better Tier

7 years with 49ers (38-36, 1-1 in playoffs)

5 years with Chiefs (50-26, 1-4 in playoffs)

Alex Smith was the top pick in the 2005 draft, when the 49ers chose him over local product Aaron Rodgers. But Smith’s tenure with the 49ers was rocky. Early in his career he suffered a serious shoulder injury and missed the entire 2008 season, and then found himself battling for the starting job.

In seven seasons with the team, he went through three head coaches and six offensive coordinators. He would later describe the 49ers organization of the time as “completely dysfunctional.”

When he finally started to play well under Jim Harbaugh in 2012, Smith sustained a concussion midway through the season. Colin Kaepernick then moved into the starting lineup, where he excelled.

That led to Smith losing his starting spot, and the 49ers traded him to the Chiefs before the 2013 season.

In Kansas City under Andy Reid, Smith went from an underachiever to perhaps the best game manager in the league. He developed a reputation for protecting the football, and Reid got more good games out of Smith than he ever had with the 49ers. Unfortunately, Smith was never able to win more than a single playoff game with both teams.

The Chiefs drafted Patrick Mahomes in 2017, and he sat behind Smith for a year. Reid knew that Mahomes would be his quarterback of the future, and the Chiefs ended up trading Smith to Washington in early 2018. While Smith led Washington to a 6-4 record, a devastating leg injury ended his season and possibly career.

Smith has had 17 surgeries on his leg since. However, he is not officially retired, and has said that he wants to come back.

The “Good Enough to Get You Beat” Tier

Steve DeBerg

3 years with 49ers (7-28)

4 years with Chiefs (31-20, 1-2 in playoffs)

Ah, Steve DeBerg. The quarterback who kept getting replaced by younger guys. He bounced around a bit after the 49ers and before landing with the Chiefs. He’s also a quarterback who was much better in Kansas City than he was in San Francisco.

DeBerg was the 49ers’ starting quarterback in 1979, the first year Bill Walsh brought his revolutionary West Coast offense to San Francisco.

Speaking of Walsh, he once famously described DeBerg as “just good enough to get you beat,” which means he was utterly infuriating to watch, even if he wasn’t always bad.

DeBerg tended to play up or down to the competition he faced, though to his credit, he was never afraid to throw the ball. In 1979, he led the league in completions (347) and pass attempts (578), but he also threw more interceptions (21) than touchdowns (17). He won few games in Walsh’s offense, which wouldn’t really get going until Montana took over for good during the 1980 season.

In 1981, DeBerg was traded to the Broncos, where he compiled a 5-6 record and later backed up John Elway. He was then traded to the Buccaneers. In Tampa, he started sporadically (and also backed up Steve Young and Vinny Testaverde) en route to an 8-26 record in four seasons.

He was traded a third time in 1988 — this time to the Chiefs. DeBerg’s play definitely improved in Kansas City. Not only did he have a winning record in his four seasons, but he even notched a playoff win. He went from throwing 37 touchdowns and 60 interceptions with the 49ers to throwing 67 touchdowns against 50 interceptions with the Chiefs.

The journeyman quarterback would rejoin the Buccaneers in 1992, then spent time with the Dolphins and Marino in 1993 before retiring. Five years later (!), DeBerg returned as a backup with the Falcons under head coach Dan Reeves, who coached DeBerg in Denver. DeBerg became the oldest quarterback to start a game that season and was the oldest player on a Super Bowl roster. The Falcons lost to Elway and the Broncos in Super Bowl XXXIII.

He retired for the second time after that season, at 45 years old.

The Decidedly Average Tier

Steve Bono

4 years with 49ers (5-1)

3 years with Chiefs (21-10, 0-1 in playoffs)

We’re getting into “who?” territory here, but Bono did compete in the playoffs, which is more than some quarterbacks can say. He sat behind Montana and Young for a while in San Francisco, before starting six games in 1991 when both went down with injuries. He went 5-1 and threw 10 touchdowns and three interceptions in those six starts.

In 1994, he was traded to the Chiefs in exchange for a fourth-round pick. Bono was Montana’s backup once again that year and then became the starting quarterback in 1995 after Montana retired. He even had a 76-yard touchdown run, then the longest by a quarterback in NFL history:

Bono played well for the Chiefs, leading them to a 13-3 record and a division title in 1995. He also made his first and only Pro Bowl that season. In 1996, he went 8-5 with 12 touchdowns and 13 interceptions, then was released prior to the 1997 season in favor of the next guy on this list.

You’d think, looking at his record, that Bono might be underrated here, but he played on some very good teams with excellent supporting casts — guys like Marcus Allen, Derrick Thomas, and Neil Smith in Kansas City and Jerry Rice, Tom Rathman, and Charles Haley in San Francisco. He also threw a lot of interceptions (42 for his career, compared to 62 touchdowns) and had a low completion percentage, just 55.3 percent in his time with the Chiefs.

Elvis Grbac

3 years with 49ers (6-3)

4 years with Chiefs (26-21, 0-1 in playoffs)

Grbac is another player who occasionally looked quite good on the stat sheet, but was probably more of a product of the players around him than anything else. Drafted by the 49ers in 1993, Grbac was Young’s backup during their Super Bowl run in 1994.

He would go on to start nine games with the 49ers. In his three years in San Francisco, Grbac had a 6-3 mark with 18 touchdowns against 16 interceptions. He made more of an impact after signing with the Chiefs in free agency. There, he took over the reins as starting quarterback when the team released Bono.

He and Rich Gannon shared the snaps that 1997 season, though Grbac got the nod to start their Divisional Round playoff game against the Broncos. The Chiefs lost a close defensive battle, 14-10.

In Kansas City, Grbac won 26 games and even made the Pro Bowl in the 2000 season, but he was never a guy who could elevate the Chiefs. He signed with the Ravens before the 2001 season, and after starting 14 games and two more in the playoffs, he was released that offseason. He opted for retirement rather than a backup gig elsewhere.

The Trivia Answer Tier

Bob Gagliano

2 years with Chiefs

1 year with 49ers (1-0)

Only one quarterback went the other way — from the Chiefs to the 49ers — and that was Bob “The Goose” Gagliano, out of Utah State. Gagliano didn’t have much of an NFL career, joining the Chiefs in 1982 and throwing just one pass (a completion!).

After three seasons as a backup, he signed with the USFL’s Denver Gold and then joined the 49ers in 1986. He started one game for the 49ers, during a players’ strike. He won the game while throwing for just 150 yards and no touchdowns. Gagliano had brief stints with the Oilers and Colts in 1988 before signing with the Lions in 1989.

He wound up starting 11 games in Detroit, but generally did nothing of note during his playing career.

So far, it’s safe to say the Chiefs have gotten more out of 49ers quarterbacks than the other way around.