Shortstop Jose Iglesias and the Baltimore Orioles have agreed to a one-year contract that includes a club option for the 2021 season, the team announced Wednesday.

The deal is valued at $3 million according to ESPN and reports.

The deal was first reported Monday by MLB.com.

Iglesias provides the rebuilding Orioles a solid glove and an effective bat. Although Baltimore general manager Mike Elias has cut payroll while trying to overhaul the roster, the Orioles desperately needed a shortstop after trading veteran Jonathan Villar to Miami in December for a minor league pitcher in a cost-cutting move.

Iglesias, 30, became a free agent when the Cincinnati Reds didn't tender him a contract in December.

He set career highs with 11 home runs and 59 RBIs this past season and also hit .288, starting 144 games at shortstop with a .980 fielding percentage and appearing in 146 games overall.

He was an All-Star with the Detroit Tigers in 2015 and is a career .273 hitter with 32 home runs and 247 RBIs.

Freddy Galvis will be the Reds' starting shortstop in 2020 after the Reds picked up Galvis' $5.5 million option in November. Galvis, acquired in a trade with the Blue Jays last season, set career highs with 23 home runs and 70 RBIs last season.

ESPN's Jeff Passan and The Associated Press contributed to this report.