The Giants and Reds have announced a trade that will send right-hander Mike Leake to San Francisco in exchange for 21-year-old Class-A Advanced right-hander Keury Mella and corner infielder Adam Duvall.

Leake, 27, is in the midst of his third straight season of solid run prevention in one of baseball’s most hitter-friendly atmospheres. The free-agent-to-be currently sports a 3.56 ERA with 5.9 K/9, 2.2 BB/9 and a 51.5 percent ground-ball rate in 136 2/3 innings. Dating back to 2013, Leake has cemented himself as a durable source of quality innings. He made 64 starts from 2013-14, totaling 406 2/3 innings in that time, and he’s made 21 starts this year, averaging 6.5 innings per appearance.

The Giants have cycled through eight different starting pitchers this season and received an ERA south of 4.00 from only two of them, creating a good deal of uncertainty in the rotation, particularly in light of injury struggles for Matt Cain, Jake Peavy and Tim Hudson. The emergence of Chris Heston has been a boon to the San Francisco pitching staff, but the club has reportedly been on the hunt for arms to shore up the staff, and Leake will certainly help.

In Leake, the Giants have picked up an asset whose limitations — specifically a below-average strikeout/swinging-strike rate in Leake’s case — are minimized by their home park and provided the team some much-needed stability in the rotation. While Leake isn’t on the same level of other rumored Giants target such as David Price and Cole Hamels, he’s an upgrade to the team and, perhaps most importantly, could factor into a potential postseason rotation for the reigning champs. Leake will also improve the Giants’ chances of keeping up with the Dodgers in the division and thereby avoiding a one-game playoff. A half-game currently separates the two clubs.

The move to San Francisco will be advantageous for Leake in multiple ways. First and foremost, Leake will move into a much better pitching environment for the final push toward his first bout with free agency, which should lead to improvements in his overall run prevention numbers. Secondly, and perhaps more importantly, is that the trade makes him ineligible to receive a qualifying offer. Set to reach free agency after this season, before his age-28 season, Leake would’ve been a lock to receive a QO despite his status as more of a mid-rotation arm than a front-of-the-rotation piece. Now, however, he’ll hit the open market as one of the youngest players available and without the burden of draft pick compensation, which figures to work quite nicely in his favor.

The move to the rotation for Leake means that one of Hudson, Peavy or Cain will be demoted from their spot, and Giants GM Bobby Evans tells reporters, including Andrew Baggarly, that it will be Hudson who will be departing from the starting five (Twitter link). While Hudson has a 4.80 ERA in 101 innings this season and has not pitched near the level he did in a brilliant debut campaign with the Giants in 2014, it’s nevertheless unusual to see him heading for a bullpen. Hudson has appeared in 475 games over the course of his Major League career, and 474 of those contests have been starts. The San Francisco Chronicle’s John Shea tweets that (per Evans) Hudson “ultimately wants to see this club excel, have success and win and told me he’d do whatever it takes for that to happen.”

Turning to the Reds’ side of the deal, Mella ranks first on MLB.com’s midseason list of Giants top prospects and second on Baseball America’s version of the same list. ESPN’s Keith Law tweets that he considered Mella the best arm in San Francisco’s system as well. MLB.com’s Jim Callis and Jonathan Mayo write that Mella has the best combo of stuff and pitchability of any arm in San Francisco’s system, making him a candidate to rise quickly through the minors. He’s 93-95 mph with his fastball regularly, touching 97 when needed, per their report, and has the potential for three average-or-better pitches. BA notes that a scout has likened his sinking fastball to a bowling ball, and that movement helps him limit homers. Still, some see the bullpen in Mella’s future, BA adds.

The 26-year-old Duvall doesn’t rate as highly on San Francisco prospect lists, but MLB.com still pegged him 25th. Duvall made his big league debut with the Giants in 2014 and has already blasted 26 homers at the Triple-A level in 2015, albeit in the extremely hitter-friendly Pacific Coast League. Callis and Mayo feel that power is Duvall’s lone tool, making him best suited for a utility role or first base duty. Given his strong Triple-A numbers and the fact that he’s already appeared in the bigs, I’d think Duvall could emerge as a bench option for Cincinnati in short order. (For those that enjoy a good anecdote, C. Trent Rosecrans of the Cincinnati Enquirer points out that Duvall homered in his first career game … a solo shot off of Leake.)

The rebuilding Reds have now moved two of their most desirable assets — Leake and Johnny Cueto — and netted a quartet of promising arms in addition to a potential big league bench piece. Mella and Duvall are joined by lefties Brandon Finnegan, John Lamb and Cody Reed in an improving Reds farm system.

FOX’s Jon Morosi first reported that the two sides were in discussions. Jon Heyman of CBS Sports tweeted that Leake would go to the Reds, adding that Cincinnati would net two minor leaguers. Alex Pavlovic of CSN Bay Area reported Mella’s inclusion (on Twitter), and Morosi reported that Duvall was in the deal, too (on Twitter).