The Rockies' DJ LeMahieu follows the flight of his double...

The Rockies' DJ LeMahieu follows the flight of his double to drive in two runs off Dodgers starting pitcher Walker Buehler on June 2, 2018, in Denver. Credit: AP/David Zalubowski

The Yankees reached agreement with three-time Gold Glove second baseman DJ LeMahieu on a two-year contract on Friday, a source confirmed, which would seem to affect their pursuit of one of this offseason’s more coveted free agents, Manny Machado.

The deal, reportedly worth $24 million, is pending a physical.

LeMahieu, 30, easily could serve as a utility infielder for the Yankees, having played all four infield positions during his eight-year career — though only four games each at shortstop and first base. He has played 892 games at second base and 41 at third.

Didi Gregorius, the Yankees' starting shortstop the past four seasons, had Tommy John surgery in October, and it's unclear when he will be ready to play. The Yankees have newly signed Troy Tulowitzki and Gleyber Torres available to play short until Gregorius returns.

Machado is a Gold Glove third baseman who has expressed a preference for returning to his natural position at shortstop, where he played most of last season with the Orioles and Dodgers. All of this would lend itself to a crowded infield if the Yankees indeed signed Machado. Between Tulowitzki, Torres and third baseman Miguel Andujar, the glut on the left side points to the distinct chance that Machado will land with one of the other teams he has visited in free agency, the Phillies or White Sox.

Machado reportedly is seeking a deal near $300 million, and though general manager Brian Cashman had dinner with Machado and his agent, Dan Lozano, after a visit to Yankee Stadium last month, it’s unclear how far negotiations have gone.

As for the righthanded-hitting LeMahieu, the two-time All-Star had a .276/.321/.428 slash line with a career-high 15 home runs along with 62 RBIs in 2018 while playing his home games in the friendly confines of Coors Field. He won the 2016 National League batting title by hitting .348 and is a career .298 hitter.

There is the small question of the Coors Field factor, as LeMahieu has a .329/.386/.447 slash line with 21 home runs and 197 RBIs in 470 games in Colorado.  He has played only two games at Yankee Stadium, going 3-for-9. Spray graphs throughout his career indicate he’s a strong opposite-field hitter and could benefit from the short porch in rightfield.

According to FanGraphs, LeMahieu was sixth in baseball last year in defensive runs saved (18), tops in that category among second basemen and seventh in overall defensive value. He spent the last seven years of his career with the Rockies after making his debut with the Cubs in 2011. 

LeMahieu provides a strong defensive option at third base if the Yankees need someone more consistent than Andujar, whose fielding was a liability last season. That prompted manager Aaron Boone to replace him defensively in late-game situations late in the season. 

The deal also provides insurance for Tulowitzki, who has played only 66 games the past two seasons — none in 2018 — because of injuries and heel surgery. If Tulowitzki gets hurt or is unable to perform at the level at which the Yankees hope, Torres could move to shortstop, his natural position, and LeMahieu could slot in at second, the position at which he earned his Gold Gloves.

It appears the Yankees are putting together contingencies upon contingencies for their infield, which also includes first basemen Luke Voit and Greg Bird, who agreed to a one-year contract Friday before the 1 p.m. deadline, thus avoiding arbitration.

“We’re slowly addressing all aspects of our roster that are obvious needs,” Cashman said last week during a conference call to announce the Tulowitzki signing. “That doesn’t preclude us from looking and exploring upgrades in places that we have existing players regardless because that’s the job at hand.”

D.J. LeMahieu file

Age: 30

Bats/Throws: R/R

Position: 2B/3B

Teams: 2011 Cubs; 2012-18 Rockies

2014: Gold Glove

2015: All-Star; batted .301

2016: .348 BA led National League

2017: All-Star; Gold Glove; .310 BA

2018: .276 BA, 15 HR, 62 RBIs; Gold Glove

Career: 8 years, .298 BA, 49 HR, 349 RBIs, .350 OBP

More Yankees headlines

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME