Jake Peavy, one of the better clubhouse guys for the Boston Red Sox, was traded to the San Francisco Giants Saturday afternoon. (Photo by Kelly O’Connor via SittingStill.smugmug.com)

The Boston Red Sox agreed on a deal that will send pitcher Jake Peavy to the San Francisco Giants for a pair of pitching prospects out of the Triple-A affiliate for the Giants, lefty Edwin Escobar and right-handed reliever Heath Hembree. Both teams will split the remainder of the 33-year-old’s salary for the 2014 season. He is a free agent at the end of the season.

Peavy had failed to do much against American League opponents with the Red Sox since joining the team last trading deadline with just one win over that span against AL foes. In 2014, the veteran struggled with run support and the longball as he was 1-9 with a 4.72 ERA in 20 starts while allowing a team-high 20 home runs.

Both prospects from the Giants were in the preseason top-10 in the farm system.

Escobar was the No. 2 prospect, but has struggled so far in 2014 in the Pacific Coast League. He was 3-8 with a 5.11 ERA in 20 starts with Triple-A Fresno. He had great seasons in 2013 and 2012 in the minors and could be a solid starter at times with the ability on the mound.

Hembree became a Pacific Coast League All-Star this year and looks to be a solid option out of the bullpen. He has 49 saves over the last season and a half while also pitching 7.2 scoreless innings with 12 strikeouts with the Giants last season. If the Red Sox can groom him into a legitimate closer in a big market, then his acquisition is a big plus.

Both players were added to the 40-man roster while being sent to Triple-A Pawtucket on Saturday. There was an open spot on the 40-man and the moving of Peavy opened up another.

In Peavy’s place, Allen Webster will get the start for the Red Sox against the Tampa Bay Rays on Sunday afternoon. Peavy will start against the Los Angeles Dodgers on Sunday Night Baseball for the Giants at 8 p.m. on ESPN.