Jimmie Ward is a favorite of the 49ers’ coaching staff – each of the coaching staffs the 49ers have had in his five seasons with the club.

Despite his history of injuries, the defensive back will be returning for another season on a one-year, $5 million contract, a source confirmed to NBC Sports Bay Area. NFL reporter Adam Caplan first reported the news.

The 49ers were concerned another team could come in with a multi-year contract offer for Ward. But that offer never materialized. Ward has the flexibility to be a starter at cornerback or free safety for the 49ers.

Last year, Ward started three games at cornerback and four at free safety before sustsaining a fractured forearm. It was the fourth season-ending broken bone Ward sustained in his five seasons with the 49ers.

Ward was a first-round draft pick in 2014, and played last season on the fifth-year option at $8.5 million.

[RELATED: Latest NFL free agency rumors, live updates and news]

Coach Kyle Shanahan made it clear at the NFL Scouting Combine in Indianapolis that he wanted Ward to remain with the 49ers. The 49ers like how hard Ward plays, as well as his unique versatility.

“I love Jimmie Ward,” Shanahan said. “I really hope to have him back. We all know he’s struggled a little bit to stay healthy. But he’s a guy, as a person, I’ll go to war with every day. I really trust and believe in, and I love him as a player, too."