NEW YORK — Gold Glove-winning second baseman DJ LeMahieu and the New York Yankees have finalized a $24 million, two-year contract.

The deal, which would appear to eliminate New York as a destination for Manny Machado, was agreed to Friday subject to a successful physical. He will earn $12 million in each of the next two seasons.

The 30-year-old LeMahieu spent the previous eight seasons with Colorado at hitter-friendly Coors Field and won the NL batting title in 2016 with a .348 average. He hit .276 last year with 15 homers and 62 RBIs, and he won his second straight Gold Glove and third overall.

New York was seeking infielders in the absence of shortstop Didi Gregorius, who is recovering from Tommy John surgery and is not expected back until summer. The Yankees signed former Colorado shortstop Troy Tulowitzki last week and said he will be their starting shortstop. LeMahieu likely will see time at second, third and possibly even first.

Outfielder Tim Locastro for was designated for assignment to open a roster spot.

___

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