Outfielder Martin Prado and infielder Stephen Drew were acquired by the New York Yankees as the clock expired on the non-waiver trade deadline Thursday afternoon.

The Yankees sent slugger Peter O'Brien to the Arizona Diamondbacks for Prado, who is in the middle of a four-year, $40 million contract. Prado can play seven positions, and is likely to see time in the outfield and at second base for the Yankees.

Prado, 30, is hitting .270 with five homers and 42 RBI this season. He has a career .290 batting average with the Braves and Diamondbacks and primarily played third base in Arizona.

Drew, a shortstop with the Boston Red Sox, joins the Yankees as a likely second baseman. He was traded for light-hitting Kelly Johnson, who signed a one-year deal to platoon with Brian Roberts on Dec. 6.

O'Brien, a right-handed power hitter, has 33 home runs between Class A and Class AA this season, but he did not have an everyday position with the Yankees. The Diamondbacks also receive cash considerations or a player to be named later.

Drew, 31, signed a one-year contract with Boston on May 29 extending through the 2014 season. He is batting .176 in 39 games in 2014.

Drew can play third or short. He's most likely to slot in at second base with Derek Jeter entrenched at shortstop and Chase Headly, acquired from the San Diego Padres, at third.