Mark Melancon is the Nationals’ new closer. (AP Photo/Gene J. Puskar)

SAN FRANCISCO — While making his trek from Milwaukee to San Francisco Saturday — a whirlwind trip that included a layover in Phoenix and concluded at 2 a.m. Sunday morning — Mark Melancon exchanged texts between his two delayed flights with Jonathan Papelbon, the man whose job he is taking.

Melancon, the Washington Nationals’ new closer, said Sunday that Papelbon, the Nationals’ previous closer, was “awesome” about the potentially awkward situation.

“It’s a tough situation so I understand that,” Melancon said sitting in the visitors’ dugout at AT&T Park, wearing fresh red garb. “Like he said, we’re here to win a championship. Whatever it takes.”

The Nationals acquired Melancon, a three-time all-star, from the Pittsburgh Pirates for Felipe Rivero and Taylor Hearn Saturday because the Nationals had lost confidence in Papelbon, a four-month progression completed by a poor outing Thursday to complete a horrendous week.

Melancon is essentially a rental as an impending free agent this offseason, but Washington didn’t have to relinquish a top prospect for the upgrade. The price for the elite, established late-inning reliever they coveted was worth it for General Manager Mike Rizzo.

The right-hander will wear No. 43 for the Nationals and his career with Washington will begin on the road before the team returns to Nationals Park Friday. Melancon remembers the last time he pitched in the District well: He allowed a game-tying, pinch-hit home run to Daniel Murphy in the ninth inning of an 18-inning Pirates win.

“I was trying to help us out,” he said.

That was a rare hiccup for the 31-year-old. Since seizing the role for the Pirates in July 2013, no other pitcher has amassed more saves. The Pirates had not lost a game he entered in a save situation since April 2015. He led the majors with 51 saves last season. This season, he has 30 saves in 33 chances, a 1.51 ERA, a 2.66 FIP, and a 0.96 WHIP.

Melancon doesn’t have the overpowering stuff most premier closers possess; according to FanGraphs, his fastball has averaged 91.6 mph season. He works around the lack of velocity with a quality four-pitch arsenal highlighted by a cutter. He said he first learned it being around Mariano Rivera when they were teammates on the New York Yankees. He closely watched Rivera pitch from various angles and noticed subtleties — where to locate it, when to throw it backdoor, its movement.

When he was traded midseason to the Houston Astros in 2010, he implemented the pitch more. It was embedded once he arrived in Pittsburgh in 2013 and had Russell Martin, a former Yankee, as his catcher.

“I think location is always key,” Melancon said. “You make sure you hit your spots.”

Melancon has been traded during a season before, but this time he is joining a first-place team as the prized commodity. A year ago it was Papelbon who joined a first-place Nationals club as the prized commodity and bumped the previous closer to a different role. The move didn’t sit well with the incumbent, Drew Storen, and was part of the Nationals’ second-half collapse. By all accounts, this episode will play out differently because Papelbon is on board.

For Melancon, that is paramount for a successful relief corps.

“Camaraderie is definitely up there,” Melancon said. “It’s important that everybody is rooting for each other and just pass the baton on and get it done. Everybody has each other’s back. Obviously, talent takes care of itself but camaraderie, I’d say, is key.”