The New York Yankees have found their replacement for Derek Jeter.

New York has acquired shortstop Didi Gregorius from the Arizona Diamondbacks in a three-team trade with the Detroit Tigers, clubs confirmed Friday.

Arizona will receive left-hander Robbie Ray and minor-league infielder Domingo Leyba from the Tigers, while Detroit lands Yankees right-hander Shane Greene. The deal comes nearly five years to the day the same teams engaged in a three-way trade that included Max Scherzer and Curtis Granderson.

The Yankees were rumored to be pursuing free-agent shortstops this winter in an effort to secure Jeter's replacement and it appears the club has settled on the left-handed hitting Gregorius.

The 24-year-old infielder began last season in Triple-A after a solid rookie season that saw him slash .252/.332/.373 with seven homers and 16 doubles across 404 plate appearances in 2013. He struggled in his second run through the majors, though, batting just .226 and producing 0.3 fWAR in 80 games this past season.

At 6-foot-2, 205 pounds, Gregorius is a big shortstop with a strong arm and is said to possess above-average defensive skills for his position at the major league level.

(Related: Yankees improve with acquisition of Gregorius)

New York not only fills a need at a premium position, but also acquires a player with upside at a controllable cost. Gregorius isn't due to hit arbitration until next season and is under team control through the 2019 season.

The Diamondbacks, meanwhile, continue to be aggressive retooling their roster this offseason. It's the third significant move general manager Dave Stewart has executed since assuming the title in September. Last month, he traded for pitcher Jeremy Hellickson and followed it up by reportedly signing Cuban free agent Yasmany Tomas.

Ray (pictured above) was ranked the Tigers' seventh-best prospect in the organization, according to Baseball America. The 23-year-old southpaw spent most of his time last year at Triple-A, but did appear in nine games – including six starts – for Detroit throughout the 2014 season.

Leyba, 19, split time at two levels of Class-A this past season, including 30 games at Low-A where the switch-hitter slashed .397/.431/.483 across 116 at-bats. The Dominican Republic native was the Tigers' fifth-rated prospect by Baseball America, and figures to be the key to this deal for Arizona but is years away from making an impact in the majors.

Greene, 26, made 14 starts for the Yankees as a rookie last season, pitching to a 3.78 ERA with 81 strikeouts in 78 2/3 innings. The right-hander still has two years of pre-arbitration remaining and is under team control for the next five seasons.