With the Trey Lance era officially over, San Francisco 49ers coach Kyle Shanahan didn't mince words when discussing the franchise's pursuit of the quarterback.

“When you move up and it doesn't work out, that's definitely a mistake,” Shanahan conceded to Tom Tolbert and Ray Ratto on KNBR 680 radio on Thursday.

The price the 49ers paid for the opportunity to draft Lance was enormous. San Francisco surrendered three first-round picks and a third-rounder to move up from the draft's 12th pick to the third in 2021.

Last week, the 49ers admitted defeat and shipped Lance to the Dallas Cowboys in exchange for a fourth-round draft pick.

For Shanahan, he has no problem defending the course of action he and team GM John Lynch chose. The team knew it needed a long-term solution at the game's most important position, and it took a swing.

“We didn't feel we'd be in a position the following year (2022) to have that option,” the coach explained. “One, in the draft and two, in free agency. And I think that was accurate, we ended up having the 29th pick in the draft the year after that and the following year and that would have been impossible to get up into a high pick to take a rookie quarterback.”

Remarkably, despite whiffing on a quarterback taken with a top-3 pick, the 49ers have thrived in the ensuing years. The team has made back-to-back NFC Championship games, despite just 102 career pass attempts from Lance.

Once it was obvious the Lance-49ers marriage wasn't going to work, Shanahan pulled the plug. He thinks everyone will benefit from that decision.

“It didn't work exactly the way all of us wanted it to and once you realize that it's time to move on and we did for us and we did for him and I think we're both in a much better position now.”