(Santa Clara) The San Francisco 49ers traded quarterback Trey Lance to the Dallas Cowboys less than three years after trading three first-round picks to select him in the draft.

A source close to the situation said the Cowboys will give the 49ers a draft midfielder pick, in exchange for whoever was picked third overall in 2021. The person spoke on condition of anonymity because the trade n hasn’t been announced by the teams yet.

The 49ers had high hopes that Lance would be their star quarterback of the future when they drafted him.

The team had traded three first-round picks and one third-round pick to the Miami Dolphins in 2021, moving from the 12th to the third pick, then drafting Lance.

Lance had only played 17 games as a starting quarterback at North Dakota State, never getting the necessary NFL experience.

In his rookie season, he was the backup quarterback for Jimmy Garappolo, starting only two games, also being hampered by a finger injury on his right hand.

Lance got the starting role last season, but it didn’t last five quarters after he broke his ankle early in the second week of the schedule. Lance then missed the rest of the season.

Lance has completed 56 of 102 passes in the NFL, for 797 receiving yards, five touchdowns and three interceptions. On 54 carries, he had 235 yards and one touchdown.

Lance’s four starts are the fewest total for a quarterback selected in the top-5 of a modern-era draft for the team he debuted with. Jack Thompson had the lowest total in starting five games for the Cincinnati Bengals, having been selected third in his class in 1979.