PHILADELPHIA, Aug. 21 -- The corridor leading to the visitor's clubhouse at Citizens Bank Park resonated with music blaring from stereo speakers on Thursday night. The Washington Nationals were making jokes and taking their time changing out of uniforms just worn while beating the Philadelphia Phillies, 4-3.

The clubhouse was festive. The players were smiling. The Nationals had lost 12 games in a row and provided little indication that such a streak would snap. But they eradicated the burden of wondering when the next win would come and instead found a way to sneak out a victory in a fashion that would shock fans who watch the team on a regular basis.

They stayed close with stellar starting pitching. They received timely hitting. And when they needed their bullpen the most, it responded.

"It's a big weight off our shoulders," said Joel Hanrahan, the Nationals' closer who completed the franchise's first two-inning save since it moved from Montreal. "People writing about it everywhere, losing 12 in a row and whatnot. We just had to get that one and see where it takes us."

Washington trailed 3-2 heading into the eighth inning before opening the frame with singles by Ryan Zimmerman and Lastings Milledge. Ronnie Belliard sacrificed both players over to the next base.

During the past 12 games, the Nationals likely would have squandered the opportunity. On Thursday, they didn't, getting back-to-back RBI singles by Jesús Flores and Austin Kearns to take a 4-3 lead.

Manager Manny Acta turned to Hanrahan earlier than closers are usually called, but it was a risk Acta was willing to take.

"He hadn't had a chance to save a ballgame in two weeks," Acta said. "I don't think it would be too much to ask him for a two-inning save to snap out of it."

Hanrahan found himself in a jam early with runners on first and second base and no outs. Yet a quick strikeout and a double play allowed Washington to escape the inning with the lead .

The bottom of the ninth became suspenseful when, with two outs and a runner on third base, Hanrahan faced a full count. Pinch hitter Chris Coste fouled off two sliders before grounding to shortstop Cristian Guzmán, who fielded the ball cleanly and threw to first to end the losing streak.

The game would never have been that close had Tim Redding not pitched one of his best games of the season. Relying on his fastball, which he estimated he threw 75 percent the game, Redding neutralized a potent Phillies lineup.

In six innings, he allowed just three hits and one run -- and he could have gone longer.

With two runners in scoring position and two outs in the sixth inning, Acta faced a difficult decision. Redding was due up and showing no signs of fatigue after throwing 86 pitches. But the Nationals had a pristine scoring opportunity to break open a 1-1 game. Acta elected not to waste the opportunity and pinch-hit Aaron Boone for Redding.

"You have to take a shot. This is the National League," Acta said. "Put a hitter out there, take the lead, and try to get nine outs out of the bullpen."

"Regardless of pitch count, I did my job," Redding said. "Normally, no, I don't want to come out with 86 pitches. But given the situation, the circumstance, we got to try to get a professional hitter to drive those runs in."

Boone popped out to first base. But Anderson Hernández, hot since coming to the Nationals on Wednesday, picked up Boone with an RBI single.

The Nationals had a lead. They just no longer had Redding.

In Redding's place, Saúl Rivera allowed two runs in the seventh inning and it appeared as if the Nationals were about to fall victim to their fourth straight series sweep.

As the losing streak crept toward historic standards, Acta reminded his club the streak was simply a number. He told them had they lost six in a row, won one, and then lost six more, the overall record in 13 games would be the same. No one would discuss the skid in a way that would further magnify it.

Now, the Nationals do not need to ponder the math. With a series starting Friday against the National League-leading Chicago Cubs, the goal becomes avoiding another losing streak -- and possibly creating a winning one.

"It feels great to end a 12-game losing streak, but we need to be careful not to go out flat tomorrow," Redding said. "We just can't be satisfied with one, seeing that we got away with one here."