1 of 5 | Second baseman Luis Arraez led the American League with a .324 batting average this season for the San Francisco Giants. File Photo by Tannen Maury/UPI | License Photo

Aug. 3 (UPI) -- The Philadelphia Phillies agreed to trade for San Francisco Giants All-Star second baseman Luis Arraez, a league source told UPI on Monday.

The Phillies are to to send right-handed pitchers Ramon Marquez and Marty Gair to the Giants in exchange for Arraez and right-handed pitcher Caleb Kilian.

Sources told MLB.com, The Athletic and ESPN that the Phillies also agreed to acquire left-handed pitcher Brooks Raley from the New York Mets in a separate transaction. The Phillies will send outfielder John Spikerman and right-handed pitcher Luke Gabrysh to the Mets in that swap.

Arraez, who led the American League with a .324 batting average, would inject production into a Phillies lineup that has the fourth-worst batting average in the National League.