WASHINGTON -- Craig Stammen left his major league debut to a standing ovation -- and his team was trailing.
The Washington Nationals made sure the rookie's gutsy effort wasn't a footnote in another disappointing defeat.
Ryan Zimmerman and Adam Dunn had RBI singles in the eighth inning, helping the Nationals end a seven-game skid with a 5-4 victory over the Pittsburgh Pirates on Thursday night.
"Whenever somebody comes out there and gives you an effort like that, you obviously want to do everything you can to reward them," Zimmerman said. "It was nice to come back and get [Stammen] off the hook because he did throw so well."
Washington's bullpen -- which had been 1-15 with 13 blown saves in 19 chances -- came through for a change. Julian Tavarez (1-3) picked up the victory with 1 2/3 innings of scoreless relief and Joel Hanrahan recorded three outs for his fourth save in seven opportunities.
Stammen retired the first 12 batters he faced in his first big league game, but couldn't hold a 3-0 lead. The 25-year-old right-hander, who had his contract purchased from Triple-A Syracuse earlier in the day, didn't allow a baserunner until Adam LaRoche led off the fifth with a double over the first-base bag.
"I thought I controlled my emotions and my thought process pretty well," said Stammen, who allowed four runs on four hits in 6 1/3 innings, walked one and struck out three. "I just didn't make pitches when I needed to. The third time through the lineup, I needed to make some better pitches."
But Washington's comeback bailed Stammen out and prevented a season-high eighth consecutive loss.
Trailing 4-3 in the eighth, Cristian Guzman started the decisive rally with a one-out single off Tom Gorzelanny (1-1) and moved to second on Nick Johnson's single to center. Zimmerman followed with a tying single to right, the 39th consecutive game he has reached base safely. Dunn put Washington ahead with the fourth single in a row of the inning.
LaRoche homered for the Pirates, who had won five in a row.
"We just battle. We were down early and then they fought back," Pirates starter Ian Snell said. "Unfortunately, that's a good lineup. You can't contain them for much longer, and they scored some runs."
Josh Bard had two RBI for Washington.
The Nationals staked Stammen to a 2-0 lead in the second as the rookie set down 19 of the first 20 hitters he faced.
"[Stammen] didn't look intimidated the whole night," Washington manager Manny Acta said. "He attacked the strike zone, worked fast, had very good sink on his fastball and just made it look easy. As he found out later, it's not that easy, but he did a very nice job for us."
Josh Willingham drew a leadoff walk and moved to third when Willie Harris doubled to right. Bard's grounder scored Willingham and Anderson Hernandez followed with a sacrifice fly for the 2-0 lead.
In the fourth, Bard's two-out single up the middle made it 3-0, scoring Willingham, who had doubled down the left-field line.
Pittsburgh cut the lead to 3-1 in the fifth. LaRoche doubled to lead off the inning, moved to third on Brandon Moss' grounder and scored on a bouncer to short by Andy LaRoche.
Adam LaRoche's seventh homer tied the game in the seventh. Nate McLouth walked and LaRoche ripped a 2-2 fastball into the second deck in right field.
Andy LaRoche followed with a run-scoring single to center, giving the Pirates a 4-3 lead and chasing Stammen.
"[Stammen] was impressive. I think he has a chance to be around for a while. He's good," Adam LaRoche said.
Snell allowed three runs on four hits, walked one and struck out six.
Andy LaRoche has 10 hits and nine RBI in his last 22 at-bats. ... Hernandez left the game with a sprained pinky finger on his right hand after grounding out to end the fourth. He was replaced at second base by Ronnie Belliard. X-rays were negative and Hernandez is day to day. ... Pittsburgh was bidding for its first six-game winning streak since May 6-12, 2008. Pittsburgh's was denied its first four-game sweep since May 29-June 1, 2006, over Milwaukee at PNC Park.