The 49ers entered the free-agent signing period looking to add starters at cornerback and safety.

They did just that last week on the first couple of days of the NFL free-agent signing period ... with a couple of big ifs.

If Jason Verrett remains healthy, he is the favorite to become the team’s starting right cornerback.

If Jimmie Ward remains healthy, he is virtually assured of being the team’s starting free safety.

The 49ers signed both players to one-year, prove-it contracts. Verrett is scheduled to make $3.6 million, while Ward is on the books for $4.5 million, according to the official contract terms Aaron Wilson of the Houston Chronicle first reported.

Both players came out in the 2014 draft. Verrett was the No. 25 overall pick of the Chargers, while the 49ers selected Ward at No. 30. Both remained with their original teams through last season on fifth-year options.

The 49ers kept Ward and managed to lure Verrett to Santa Clara, then struck a deal to prompt him to cancel scheduled trips to Houston and Kansas City. Verrett is rehabbing from Achilles surgery, which he tore during a conditioning test last summer on the first day of training camp.

“With all the things I’ve been through, all you can ask for is an opportunity,” said Verrett, who has appeared in just 25 NFL games due to injuries, including surgeries on his shoulder and knee. “The 49ers came on board. I’m happy I took the visit here and look forward to things in the future.

“The opportunity is there for me. It's wide open. It’s just for me to take it, just for me to get back healthy and get back out there on the football field and do what I know I can do.”

The 49ers invested back-to-back third-round draft picks in cornerbacks Ahkello Witherspoon and Tarvarius Moore. Witherspoon did not lock down the starting job last season after finishing with a lot of momentum and optimism in 2017.

Moore made the conversion from safety in college to cornerback. One of the fastest players on the team, Moore demonstrated some encouraging signs late last season while starting the final two games. Witherspoon, Moore, and Verrett will compete.

“It’s the NFL. There’s going to be competition anywhere you go,” Verrett said. “If you don’t like to compete, you don’t need to be in this league. I’m a competitor and I’m willing to compete with anybody.”

CB Jason Verrett talks about signing a one-year contract with the #49ers. pic.twitter.com/CFH38EISLp — Matt Maiocco (@MaioccoNBCS) March 14, 2019

Adrian Colbert entered last offseason as the starter at free safety. But he struggled with inconsistency and appeared in only seven games, going on injured reserve with a severe high-ankle sprain.

Ward started three games at cornerback and four games at free safety. The coaching staff considers him easily one of the team’s best four defensive backs. One of the team's most versatile player, Ward appears to be ticketed to start at free safety.

[RELATED: Sherman speaks highly of Verrett]

“Jimmie Ward has played at an extremely high level throughout his career when he's been healthy,” 49ers coach Kyle Shanahan said. “We all know he's struggled to stay healthy, which has been unfortunate for him.

“He plays very hard. He's very talented. And that's why it's been very hard for him to go out there and get really what he deserves as a player. But, to have Jimmie back here with the talent he has and if he can stay healthy ... we know we've got as good of a safety as we can get.”