Free agent second baseman César Hernández has agreed to return to the Cleveland Indians on a 1-year contract, a person familiar with the deal told The Associated Press on Tuesday.

The team and Hernández have an agreement, which includes a club option for 2022, in place and it will become official once medical tests have been completed. The person spoke on condition of anonymity because it could be days before everything is finalized.

Hernández had a solid season for the Indians in 2020 after he was signed as a free agent following seven years in Philadelphia. He batted .283 in 58 games, led the AL with 20 doubles and played excellent defense, committing just four errors.

His return softens the impact of Cleveland losing All-Star shortstop Francisco Lindor, who was traded to the New York Mets earlier this month.

The Indians acquired young middle infielders Andres Giménez and Amed Rosario in the Lindor deal and it was expected one of them would play second before Hernández was brought back.

The 30-year-old Hernández has a career .277 batting average. He hit a career-high 15 homers in 2018 for the Phillies and led the NL with 11 triples in 2016.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports