Jonathan Papelbon. (Drew Hallowell/Getty Images)

In their search to upgrade their bullpen for the pennant race, the Washington Nationals turned to a longtime opponent and acquired veteran closer Jonathan Papelbon from the Philadelphia Phillies. In a complicated deal that displaced Drew Storen from ninth-inning duties despite a strong season, the Nationals landed Papelbon for pitching prospect Nick Pivetta.

The Phillies also agreed to include $4.5 million to cover Papelbon’s remaining 2015 salary, according to a person familiar with the deal.

Papelbon had to approve the trade and it came with a price — the Nationals picked up his option for 2016. But Papelbon also agreed to take a pay cut; instead of the original $13 million, the option will be for $11 million, $3 million of which is deferred to 2017, according to the person familiar with the deal.

Storen, meanwhile, is out as closer as a result of the trade despite 29 saves in 31 chances with a 1.73 ERA. This marks the second time the 27-year-old has been moved out of the ninth-inning role in favor of a veteran — in 2013, the Nationals signed Rafael Soriano in the offseason after Storen blew Game 5 of the 2012 NLDS to the Cardinals.

“All I’m going to say is obviously I’m aware of the move,” Storen said. “Talked to Mike [Rizzo] about it, talked to my agent. We’ve had some ongoing discussions. Until those have progressed, I’m just going to leave it at that.”

This move seems less a reflection on Storen than on the team’s uneven bullpen as a whole.

“Papelbon is our ninth-inning pitcher,” General Manager Mike Rizzo said during Tuesday’s game in Miami. “Drew will pitch the ninth inning at times when Papelbon is not available and be our setup guy in the eighth inning as we are constructed today. … We feel we’ve got two terrific, elite ninth-inning guys.”

The Nationals, who expect to have Papelbon in uniform Wednesday, entered Tuesday’s game in Miami with a 3.39 bullpen ERA, 12th in the majors. But they have endured much turnover in personnel and struggled at times getting the ball from the starter to Storen. They are 42-7 when leading after six innings, more than the major league average of five losses, but 46-0 with a lead entering the ninth. The Nationals are also fully aware of the importance of a shutdown bullpen, as the Kansas City Royals proved last October.

“We’ve got a bullpen that can really shut down opposing teams,” Rizzo said.

Although closing is a lucrative role, sometimes the toughest matchups come up in the seventh or eighth innings. This move puts Storen into play earlier in the game, where he pitched effectively for much of last season.

Questions will linger about the ripple effects of the trade. Although Storen has carried himself professionally, how will he handle this demotion in the midst of a strong season?

“[Storen] is a guy who we’ve had frank discussions throughout his whole career in my tenure here,” Rizzo said. “… We’ve got a good rapport, but that news was difficult to take. He took it like a pro and he’s gonna be a professional in the clubhouse and on the mound.”

Another question: How will the fiery Papelbon, a six-time all-star with a career 2.32 ERA and 342 saves, blend in the Nationals clubhouse?

“This guy wants to win,” Rizzo said. “First and foremost, he wants to win. … He excels in pressure situations and that’s his personality. Does it grate on the opposition at times? Yes it does. But he comes with high credentials, high praise from his teammates and guys who’ve been around him.”

The Nationals cast a wide net in seeking bullpen help ahead of Friday’s non-waiver trade deadline, looking at big-name closers such as Craig Kimbrel and Aroldis Chapman. But the price was uncomfortable for the Nationals — the San Diego Padres and Cincinnati Reds each wanted two of Washington’s top prospects (Trea Turner, Lucas Giolito, Reynaldo Lopez, Joe Ross and Michael A. Taylor) — they settled instead on Papelbon, 34, who helped the Boston Red Sox win a World Series in 2007. Given Papelbon’s contract details and situation, the Phillies and Nationals had to clear complicated hurdles to pull off the swap.

Papelbon, who has a 1.59 ERA and was perfect in 17 save chances for the last-place Phillies, could block trades to 17 teams, including the Nationals. And he held the leverage: he vowed to block a trade to a team if he wasn’t the closer. A major reason why? Papelbon’s 2016 option vested if he finished 55 games in 2015 or 100 across the 2014 and 2015 seasons. So Papelbon needed to finish only 14 more games to trigger his option. But Rizzo guaranteed the option now and negotiated with Papelbon to reduce the price before agreeing to the trade.

With Papelbon, the Nationals also acquire a closer with a history of playoff success. Papelbon has seven career postseason saves, including three in the 2007 World Series, and a 1.00 ERA in 27 playoff innings. His last playoff appearance was in Game 3 of the 2009 ALDS and he blew that save. Storen has stumbled in the playoffs, blowing leads in Game 5 of the 2012 NLDS and Game 2 of last season’s NLDS.

Pivetta, the Nationals’ fourth-round pick in 2013, was rated the organization’s 10th-best prospect by Baseball America. He is 7-6 with a 3.02 ERA in 101 1/3 innings between Class A Potomac and Class AA Harrisburg. To make room for Papelbon, the Nationals designated catcher Dan Butler for assignment.

Chelsea Janes and Barry Svrluga contributed