The Trey Lance experience in San Francisco came to an end Friday when the 49ers traded the No. 3 pick of the 2021 NFL Draft to the Dallas Cowboys for a 2024 fourth-round selection. 

The move came days after San Francisco announced Sam Darnold as the backup quarterback behind Brock Purdy, stirring speculation that Lance would be moved. 

Brock Purdy and Trey Lance

San Francisco 49ers quarterbacks Brock Purdy (13) and Trey Lance (5) and Sam Darnold (14) and Brandon Allen (4) stand on the field during training camp at the SAP Performance Facility.  (Robert Edwards-USA TODAY Sports)

Lance was excused from Wednesday’s practice following the news in order to "clear his head," according to ESPN. 

COLTS' ANTHONY RICHARDSON DIRECTS CELEBRATION TOWARD EAGLES FANS

Following San Francisco’s 23-12 preseason loss to the Los Angeles Chargers, head coach Kyle Shanahan discussed the decision to move on from Lance. 

"When we told Trey, when we told him that he wasn’t the two [quarterback], I said we’d like to keep him here as the three. But we also want to do what’s good for him, too," Shanahan told reporters. 

Trey Lance looks to pass

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

"And when we looked into other teams, and he told us that he would like another opportunity to go somewhere where he had a chance to be the No. 2," Shanahan continued. "We thought we got some good deals for him. There was a number of teams involved. To end up getting the fourth was a little better than we anticipated and clears up a lot of money and allows a better situation for him, too."

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

The start to Lance’s career has been rocky after the 49ers traded three first-round draft picks in order to move up in the 2021 draft to acquire him. 

Lance was named the starter for 2022 after sitting behind Jimmy Garoppolo as a rookie. 

Trey Lance warms up

Quarterback Trey Lance, #5 of the San Francisco 49ers, warms up before a preseason game against the Las Vegas Raiders at Allegiant Stadium on August 13, 2023, in Las Vegas, Nevada. The Raiders defeated the 49ers 34-7.  (Ethan Miller/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

In just his second start, Lance broke his ankle, ending his season. Purdy took over in Week 13 after Garoppolo broke his foot, winning seven straight games as the starter before tearing his UCL in the NFC Championship Game against the Philadelphia Eagles

The Cowboys are set at the starting quarterback position as Dak Prescott enters his eighth NFL season. Lance is expected to be the third-string quarterback in Dallas, according to NFL Network.