Trey Lance's tenure with the San Francisco 49ers came to an abrupt end last week when he was traded to the Dallas Cowboys.

The Niners gave up significant assets to move up and select Lance at No. 3 overall in the 2021 draft. The team received a fair amount of criticism at the time, partially due to Lance's limited playing time in college.

Lance dealt with setbacks during his two-year stint in San Francisco, and the trade signaled that the gamble to draft the young quarterback failed. 

Niners head coach Kyle Shanahan offered a long-expected admission about the move to draft Lance.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Shanahan stands with Purdy and Lance during training camp

Head coach Kyle Shanahan of the San Francisco 49ers talks with quarterbacks Trey Lance (5) and Brock Purdy (13) during training camp at SAP Performance Facility Aug. 4, 2023, in Santa Clara, Calif. (Thearon W. Henderson/Getty Images)

Shanahan recently appeared on KNBR 680 radio and characterized the draft choice as a "mistake." But, he also said the 49ers made the move based on the state of the veteran free agent quarterback market.

KYLE SHANAHAN SAYS HE'S 'REALLY NOT CONCERNED ABOUT' JIMMY GAROPPOLO CALLING 49ERS QB SITUATION 'WEIRD'

"When you move up, and it doesn’t work out, that’s definitely a mistake," Shanahan said. 

"But we did like our decisions when we looked into the two veterans that were available, and we didn’t get that. And we knew what way we were going to have to go two years from then. We knew we needed to go up and get a quarterback at that time."

Trey Lance looks to pass

Trey Lance of the San Francisco 49ers looks to pass during the second half of a preseason game against the Denver Broncos at Levi's Stadium Aug. 19, 2023, in Santa Clara, Calif.  (Loren Elliott/Getty Images)

Lance only appeared in eight games during his first two NFL seasons. He's also dealt with injuries during his young career.

Seventh-round draft pick Brock Purdy started games down the stretch in 2022, leading the team to an appearance in the NFC championship.

Trey Lance warms up before a game

Trey Lance of the San Francisco 49ers warms up before a game against the Seattle Seahawks at Levi's Stadium Sept. 18, 2022, in Santa Clara, Calif. (Thearon W. Henderson/Getty Images)

Shanahan, entering his seventh year as the Niners head coach, expressed optimism about both the team's future and Lance's career with the Cowboys

"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," he said.

CLICK HERE TO GET THE FOX NEWS APP

Lance recently said he is looking forward to joining a new team for a fresh start.

The 49ers open the season Sept. 10 against the Steelers. The Cowboys kick off the season that night against the New York Giants on "Sunday Night Football."