NASHVILLE, Tenn. (AP) Free agent infielder Ben Zobrist and the Cubs agreed Tuesday to a $56 million, four-year contract, a deal that caused Chicago to trade Starlin Castro to the New York Yankees for pitcher Adam Warren.

A two-time All-Star, Zobrist gets a $2 million signing bonus, payable by Jan. 31, and salaries of $10 million next year, $16 million in each of the following two seasons and $12 million in 2019.

The 34-year-old switch hitter plays second, third and the outfield, and he was an important spark for the Kansas City Royals in their run to the World Series title.

More from FoxSports

He is a career .265 hitter with a .355 on-base percentage and .431 slugging percentage, and he hit .276 this year with 36 doubles, 13 homers and 56 RBIs for Oakland and Kansas City, which acquired him on July 28.