Washington sent reliever Felipe Rivero and pitching prospect Taylor Hearn to the Pirates for Melancon, who supplants struggling Jonathan Papelbon as Washington's closer. Melancon is expected to join the Nationals on Sunday for their series finale at San Francisco.
Nationals general manager Mike Rizzo and manager Dusty Baker called Melancon on Saturday. Both Rizzo and Baker said they were impressed that Melancon told them he planned to immediately check in with Papelbon.
"It says a lot about his character and makeup, and that was a big reason why he was such an attractive target to us," Rizzo said. "His performance level is great, but his makeup and character are a lot of the reason that we went out and got him. That tells me he's team-first and Mark Melancon second."
A 31-year-old right-hander, Melancon has converted 30 of 33 saves with a 1.51 ERA this season and joins his fifth organization in eight years. He is making $9.65 million and is eligible for free agency after the World Series.
Once considered a possible successor to Mariano Rivera when he broke into the majors with the New York Yankees in 2009, Melancon said during the All-Star break he knew a trade was possible, given his contract status.
The move comes as the Pirates find themselves on the fringe of the wild-card race. While general manager Neal Huntington stressed the team remains committed to reaching the playoffs for a fourth straight season, the opportunity to deal Melancon -- who led the majors with 51 saves in 2015 and had 33 in '14 -- for two young arms with friendly long-term contracts was too good to pass up.
Rivero is under team control through 2021 and hit 100 mph on the radar gun regularly during an extended relief appearance against the Pirates this month. If Melancon left as a free agent, Pittsburgh would have received a high draft pick as compensation.
"We knew full well that holding Mark Melancon would have been a good return, but at the end of the day we felt this was a better return for us," Huntington said.
This was Melancon's fourth season in Pittsburgh after he also pitched for Houston, Boston and the Yankees.
He will move his family once more -- his wife and three kids.
"This has been a blast. Pittsburgh has a special place in heart. My family has been treated so well," Melancon said. "The experiences we've had, just running through my mind all the wild-card games, just big games that we've been in. From where we started, to where we are now, it is an honor. It is an honor to be a Pirate. We got to go through those experiences together. My teammates are my best friends."
Papelbon is 2-4 with a 4.41 ERA and has allowed eight runs and seven hits in his past three outing. Baker wouldn't say earlier Saturday whether Papelbon still was his closer. Baker pulled Papelbon from a game Thursday in the ninth inning.
Rivero, a 25-year-old lefty, is 0-3 with a 4.53 ERA this season. Hearn is a 21-year-old lefty who was the Nationals' fifth-round pick in the 2015 amateur draft.
The Pirates will plug Rivero into a seventh-inning role, with Neftali Feliz working the eighth and Tony Watson in the ninth. Watson was an All-Star in 2014 in a set-up role and will take over a position where Pittsburgh has enjoyed plenty of success during its rise from mediocrity. Each of its previous three closers: Melanon, Jason Grilli and Joel Hanrahan, made the All-Star team wearing black-and-gold.
Manager Clint Hurdle said he will miss Melancon but is confident in his bullpen options.
"I love the guy, love the family. Happy we had him. He helped us, I believe we helped him," Hurdle said. "We are not giving up anything, we aren't lowering the bar. We are not settling. Our organization made a baseball trade, with confidence that our bullpen is going to be in a good place. We are going to be able to compete this year, we are going to be able to add to our competition level in the years to come."
Huntington hinted the team may try to take the money it will save by not paying the remaining portion of Melancon's contract and use it before Monday's trade deadline. The Pirates need help in the starting rotation, which has been forced to turn to rookies Jameson Taillon and Tyler Glasnow quickly as established players Jeff Locke, John Niese and Juan Nicasio faltered.
Also Saturday, Washington recalled right-handed pitcher Reynaldo Lopez from Triple-A Syracuse.
The Associated Press contributed to this report.