SANTA CLARA, Calif. (AP) — The San Francisco 49ers have acquired star running back Christian McCaffrey from the Carolina Panthers, according to two people familiar with the situation.

The people spoke to The Associated Press on Thursday night on condition of anonymity because the trade has not been made official.

ESPN first reported the trade that brings McCaffrey back to the Bay Area where he starred in college at Stanford in a deal for draft picks.

The Panthers will receive picks in the second, third and fourth rounds of the 2023 draft, as well as a fifth-rounder in 2024, according to one of the people who spoke to the AP. Carolina had been seeking a first-round pick, but San Francisco had already dealt their 2023 first-round pick in a deal to draft Trey Lance last year.

McCaffrey joins a talented group of playmakers in San Francisco with versatile receiver Deebo Samuel, star tight end George Kittle and receiver Brandon Aiyuk.

But the Niners (3-3) were not as strong at running back with starter Elijah Mitchell out with a knee injury. McCaffrey provides coach Kyle Shanahan with one of the best as both a runner and receiver, adding another element to San Francisco’s offense.

McCaffrey has a $990,000 salary this year after Carolina reworked his contract, making him an easy fit under the salary cap. He is owed about $36 million over the next three years, but none of that is guaranteed.

McCaffrey becomes the second skill position player to be traded this week by the Panthers (1-5) since coach Matt Rhule was fired on Oct. 10. Carolina sent wide receiver Robbie Anderson to the Arizona Cardinals on Monday for two future late-round draft picks.

The 26-year-old McCaffrey is considered one of the most versatile running backs in the league when healthy because of his ability as a runner, receiver and blocker.

He missed 23 games over the previous two seasons due to injuries, but has played in all six games this season and is fourth in the NFL in yards from scrimmage (607) despite playing for the league’s 32nd-ranked offense. He and Cleveland Browns running back Nick Chubb are the only players in the league to have five games this year with at least 100 yards from scrimmage.

McCaffrey has 7,272 yards from scrimmage — 3,980 rushing and 3,292 receiving — and has scored 50 touchdowns since coming into the league as the eighth overall draft pick in 2017.

McCaffrey’s best season came in 2019 when he had 1,387 yards rushing and 1,005 yards receiving, making only the third player in NFL history to eclipse 1,000 yards in both categories. He also had 19 touchdowns that season and was named All-Pro.

McCaffrey’s father, Ed, won a Super Bowl with the 49ers in the 1994 season and won two more titles in Denver with Shanahan’s father, Mike, as his head coach.

___

AP Sports Writer Steve Reed contributed to this report

___

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP_NFL