Denard Span, right, celebrates with Ian Desmond and Kevin Frandsen after the Nationals’ 5-2 win over the Pirates. Span scored two runs to back Doug Fister, who allowed just one run over five-plus innings. (Joe Sargent/Getty Images)

Baseball players, for the sake of their sanity, strive to minimize the importance of any single outcome. Sometimes circumstances force them to admit victory becomes more consequential, that a win means more to their psyche than in the standings. On Sunday afternoon, “Turn Down For What” blared through a clubhouse that had been don’t-wake-the-baby silent for days, and the Washington Nationals arrived at one of those moments.

Doug Fister had lifted the Nationals to a 5-2 victory over the Pittsburgh Pirates at PNC Park, a win that served as a relief valve. They snapped a four-game losing streak that spanned every member of their rotation except Fister. They broke a string of excruciating defeats — they had outscored opponents by two runs over their previous seven games despite losing five of them. They ensured they would hit Memorial Day at .500 and could hope they had taken the first step forward from mediocrity as they return to Nationals Park. They avoided their first four-game sweep since the opening series of Jim Riggleman’s tenure.

For all those reasons, the Nationals could break with protocol. Needing to win is a concept foreign to baseball’s six-month grind. And yet Manager Matt Williams said afterward, “We needed this one today.”

“Today was an important win,” reliever Craig Stammen said. “We needed to break that losing streak, get a good vibe as we go home — and not with our tail between our legs.”

The Nationals acquired Fister during the offseason to augment their starting rotation, not to top it. But when Fister climbed the mound Sunday afternoon — and now that he is healthy — there may be no other starter they prefer. He allowed one run in 51 / 3 innings, yielding six hits while striking out four.

Fister pitched nearly flawlessly for five innings, and Stammen delivered a powerhouse relief performance after Williams gave Fister a quick hook in the sixth. Denard Span and Anthony Rendon spearheaded the Nationals’ attack from the first and second lineup spots, scoring two runs each. Their battered lineup grew closer to whole as Adam LaRoche came off the disabled list and went 1 for 4.

“You want to put an end to it,” LaRoche said. “I don’t want to say it’s ever easy to lose. But it’s easier when you’re winning three or four.”

Against lefty Francisco Liriano, the Nationals staked Fister to a two-run lead before he took the mound. Fister bulldozed the Pirates with his turbo-sinker and just enough curveballs to keep them off -balance.

The first turbulence he faced did not arrive until the fifth, and it wasn’t even self-inflicted. Fister induced a double play ball with one out, but it scooted under Ian Desmond’s backhand attempt for his 13th error.

Nationals starters this season have struggled to cope after misplays. Fister shrugged. The next batter, pinch-hitter Jose Tabata, rolled another grounder to Desmond. This time, Desmond started a 6-4-3 double play.

“You have to have a short-term memory in this game, and everybody came out firing,” Fister said. “Whether it was playing defense, whether it was hitting, on the mound, whatever.”

In his first five innings, Fister had yielded three hits, all singles, and no walks while striking out four. He had used only 72 pitches, and he appeared poised to work deep into the game to squelch the Nationals’ losing streak on his own.

And then Fister’s outing came to a sudden end. Josh Harrison led off the sixth and smashed a sinker into the Nationals’ bullpen. Neil Walker followed with a sharp single to right, and after Andrew McCutchen’s groundout, Ike Davis ripped another single to left.

“The ball started to get up a little bit,” Williams said. “Could he have gone longer? Yeah. We decided to get him out of there.”

With two runners on base, Williams did not grant Fister the same ace treatment he afforded Stephen Strasburg the night before. Fister stared at Williams, incredulous, as Williams walked to the mound to take the ball.

“I felt strong,” Fister said. “You never want to come out of a ballgame. At the same time, they see some things I may not. I’m a little emotional at the time just because you’re up there, you’re battling, you got all the adrenaline flowing.”

Williams summoned Stammen to face Starling Marte, whose double Saturday night led to Strasburg’s downfall. Stammen threw a 91-mph sinker that dove toward Marte’s ankles. Marte pounded it into the turf. Rendon scooped the ball, stepped on third and fired across the diamond to complete a double play.

“He looked really smart because I got it done in one pitch,” Stammen said. “I had never done that, but it was fun. It’s less stressful that way.”

Stammen retired three straight hitters in the seventh and pitched into the eighth, a spot normally reserved for Tyler Clippard. But Williams wanted to rest Clippard with what he described as “normal” tightness. Clippard did not pitch Saturday, but he had appeared in 25 of the Nationals’ first 49 games.

The Nationals faced a left-handed starter, which boosted their cause even before the first pitch had been thrown. The Nationals have been stymied by right-handed starters, but they had hit .284 against lefty starters entering Sunday.

Span and Rendon pounced with a leadoff double and a walk to start the game. With two outs and runners on second and third, Liriano unleashed a 50-foot change-up. The ball bounded off Chris Stewart’s chest protector, and Span bolted from third to score the first run. Desmond laced a two-out single to right field, which scored Rendon and gave the Nationals a 2-0 lead.

In the fifth, Span ended an 11-pitch at-bat with a bullet single to right, his second hit of the game off of a lefty. Rendon blasted a triple off the right field wall to drive in Span. Rendon scored himself when Liriano fired another wild pitch.

The Nationals had taken a 4-0 lead, and Fister and Stammen ensured the Pirates never came much closer. Rafael Soriano took the mound for the first time in Pittsburgh, and he slammed the door with a 1-2-3 save, his 11th this season. They would pack for home a happy team because of just one win.

“I think throughout this whole season we’ve kept a pretty even keel,” Rendon said. “We’ve been battling throughout these injuries and these last couple tough games. It’s just the way we are. We’re not going to let too much get to us.”

More on the Nationals:

Nationals Journal: Rendon’s walks a good sign