SANTA CLARA, Calif. (AP)Despite a string of injuries, lackluster performances and a 3-3 start to the season, general manager John Lynch still views his San Francisco 49ers as a Super Bowl contender.

That belief gave Lynch the confidence to take a gamble. He traded four draft picks to Carolina for star running back Christian McCaffrey in hopes of providing a similar spark to the last time he made a big in-season trade.

”You only do this when you have belief in your team as it’s constructed,” Lynch said Friday. ”The previous time we made a big splash like this was Emmanuel Sanders back in ’19 because we felt like we had the team capable of competing for the whole deal. … We understand we have a lot of work to do. We understand this isn’t a magic pill. It’s not going to fix all our ills as a team, one player. We all have to get better.”

The 49ers are counting on McCaffrey to do that after they traded their picks in the second, third and fourth rounds of the 2023 draft, as well as a fifth-rounder in 2024 to Carolina.

They paid a heavy price to get McCaffrey but also managed to keep him away from the division rival Rams, who were the other team in the mix.

”It’s definitely a bonus,” coach Kyle Shanahan said. ”I think everybody would love the opportunity to have a player like Christian. I think everyone looks into it, but it’s also nice to keep a good player away from the team that we have to compete with year in and year out.”

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 were not as strong at running back with starter Elijah Mitchell out with a knee injury and ranked 20th in the league in scoring at 20.3 points per game.

McCaffrey could get his first shot with the 49ers when they host Kansas City. He passed his physical in time to get on the field for the end of Friday’s practice and will have a crash-course on the new offense in hopes he can play a limited role Sunday.

”I’ll leave that up to (the coaches), but it’s just my job to learn as much as humanly possible in the next two days and get ready to play a football game,” McCaffrey said.

The 26-year-old McCaffrey provides Shanahan with one of the best as both a runner and receiver, adding another element to San Francisco’s offense.

The Niners were tied with the sixth fewest passes to running backs with just 4.0 targets per game but now can feature on offense that has one of the most accomplished receiving backs in McCaffrey and a receiver who is a dynamic runner in Samuel.

”I don’t know if there’s anyone better at putting guys in positions to have success, in tailoring to what they’re good at,” McCaffrey said. ”I’ve watched him do some unbelievable things with some great running backs and even the running backs in the room right now. … You just hear legends about how good of an offensive mind he is. So to be here is exciting.”

The main knock on McCaffrey has been his durability of late. He missed 23 games over the previous two seasons due to injuries, but has played in all six games this season.

But the Niners were confident enough in McCaffrey’s health to make the deal.

”You can never have complete certainty on that,” Lynch said. ”That’s beyond our control. But you try to make the best decision you can. He has played a lot of football this year and he’s played really good football. He’s done that throughout his career.”

McCaffrey is fourth in the NFL in yards from scrimmage (607) despite playing for the league’s 32nd-ranked offense. He and Cleveland 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 after the Niners passed over him at No. 3 to take his former Stanford teammate Solomon Thomas.

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.

That leaves the 49ers with no picks in the 2023 draft until the end of the third round when they will have two compensatory picks.

”I view everything you do as a gamble,” Shanahan said. ”I view making trades as a gamble. I view not making trades as a gamble. All depends if you can tell me what’s going to happen in the future. … What I do like doing is knowing that you’re getting the right type of football player who is extremely talented, who is wired the right way.”

NOTES: Williams (ankle), DE Nick Bosa (groin) and S Jimmie Ward (hand) will return from injuries this week. … CB Charvarius Ward (groin) and S Talanoa Hufanga (concussion) are questionable. … DL Arik Armstead (foot, ankle) is out this week.

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