The New York Yankees, thought to be in the mix for a starting pitcher, have acquired infielder Casey McGehee from the Pittsburgh Pirates in exchange for reliever Chad Qualls.

McGehee, who has failed to repeat on his 2010 campaign for the Milwaukee Brewers when he hit .285/.337/.464 with 23 long balls, will act as insurance at first and third base after the recent injuries to Alex Rodriguez and Mark Teixeira. The former 10th round selection of the Chicago Cubs in 2003 is arbitration eligible next season.

Chad Qualls has appeared in only eight games this year for the Yankees, allowing five earned runs in 7 1/3 innings. The right-hander recorded 24 saves for the Diamondbacks in 2009.

Yankees manager Joe Girardi hinted that Joba Chamberlain could be activated in place of Qualls on the active roster.