With the trading deadline five days away, the Red Sox made their first trade of a prospective free agent, sending right-hander Jake Peavy to the Giants. Multiple industry sources confirmed that there was an agreement to send Peavy to San Francisco pending approval from the Commissioner’s Office. The Red Sox will pick up just over half of Peavy’s remaining salary, which had roughly $5 million left.

Jon Heyman of CBSSports.com first reported the completion of the deal; Jen Royle of the Boston Herald first reported on Saturday morning that Peavy was close to being dealt.

In 20 starts this year, Peavy is 1-9 with a 4.72 ERA while averaging roughly 6 1/3 innings per outing. He’s averaging 7.3 strikeouts per nine innings — a solid rate, but his lowest since 2003 — and 3.3 walks per nine (again, his worst rate since 2003). Yet both of those numbers, even as they reflect a declining arsenal, offer a viable baseline for a starter. But he was a frequent victim of the quick strike, as his 20 homers allowed were the most in the American League. A victim of poor run support, Peavy had made 15 straight starts (dating to May 1) without earning a win — the second-longest such streak in Red Sox team history, behind only a 16-game drought endured by Jim Lonborg in 1969.

Still, Peavy delivered six or more innings in 17 of his 20 starts, with 12 quality starts on the year. Particularly if given the opportunity to pitch in a ballpark (and division) that is more hostile to home runs, there’s a chance that he could represent a competent mid- to back-end starter who can help stabilize a rotation — something the Giants (who play in one of the most pitcher-friendly parks in the majors) have been seeking while Matt Cain has been dealing with injuries.

The Red Sox, meanwhile, will create an opening in their rotation, giving them an opportunity to evaluate pitchers who appear major league-ready or close to it. Brandon Workman has already been a contributor in Boston’s rotation this year, and both Allen Webster and Anthony Ranaudo have been effective in the Triple-A Pawtucket rotation this year.

The Red Sox, according to multiple sources, are expected to get two upper levels minor league pitchers — one a right-handed reliever, one a left-handed starter — back from the Giants in return.

UPDATE: A source indicated that the Giants have agreed to send Triple-A pitchers Edwin Escobar and Heath Hembree to the Sox, pending Commissioner’s Office approval. For a breakdown of the left-handed Escobar and right-handed Hembree — both of whom ranked in Baseball America’s preseason Giants top 10 — click here.