Free agent infielder Asdrubal Cabrera and the Texas Rangers are in agreement on a one-year, $3.5 million deal, pending a physical, league sources tell ESPN.

Cabrera can play all around the diamond and slot into a utility role if necessary, but the Rangers' plan is to play him at third base, the sources said.

The Athletic first reported news of the agreement.

The switch-hitting Cabrera, 33, batted .262 with 23 home runs and 75 RBIs in 147 games last season with the New York Mets and Philadelphia Phillies. He hit .228 with five homers for Philadelphia after being acquired on July 28 to give the team some infield flexibility and pop for its playoff push.

Cabrera has spent most of his career at shortstop but started only at second for the Mets last season and split his time at second, third and shortstop with the Phillies after the trade, so he provides a lot of versatility.

Cabrera has a career batting average of .269. His best offensive season was 2011, when he was easily the Cleveland Indians' most valuable player, batting .273 and posting career highs with 25 homers and 92 RBIs -- power numbers few saw coming. Before that season, he had hit just 18 career homers. Cabrera led AL shortstops in RBIs, was tied for first in hits (165) and was second in doubles (32) and runs (87).

Beyond that, he made dazzling defensive plays that saved runs, turned games and earned him an almost nightly spot on TV highlight packages.

Cleveland acquired Cabrera from Seattle in 2006 in a trade for first baseman Eduardo Perez. After he was called up from Triple-A in 2007, Cabrera provided an immediate spark, helping push the Indians to an AL Central title and within one win of the World Series.

Cabrera followed with seven-plus productive years in which he emerged as one of the game's best all-around middle infielders before he was traded to the Nationals in July 2014. He then played one season with the Tampa Bay Rays before signing with the Mets in 2016.

Also Tuesday, Texas announced a $1 million, one-year contract with right-hander Zach McAllister, a deal that also includes performance bonuses.

ESPN's Jeff Passan contributed to this report.