WASHINGTON -- This is how Jason Bergmann wants to conclude his injury-marred season.
"This is a good step in the right direction," Bergmann said.
Wily Mo Pena homered, and Austin Kearns went 3-for-4 with an RBI for the Nationals, who moved one game ahead of Florida at the bottom of the NL East standings. Washington won for the third straight time since losing seven in a row.
Bergmann (3-5) gave up four hits, a walk and a run in seven innings to win for just the second time since May 14. Since then, he has endured separate stints on the disabled list due to right elbow inflammation and left hamstring tightness. Each time, he was out of action for more than a month.
"Today he looked great," Washington catcher Brian Schneider said. "He was back in his old form. He was getting ahead with his fastball, and then he was going to that slider. And that slider was really good today. It was nice and hard with a sharp break. That was the Bergmann of old."
Chad Cordero pitched the ninth for his 30th save.
Bergmann labored through a 27-pitch first inning but escaped without allowing a run. He settled down, though, after surrendering a solo home run to Mike Jacobs in the second that made the score 1-0.
He retired the next nine batters, striking out six during that stretch, and 17 of the next 18.
"I've known Bergmann since high school," Florida's Cody Ross said. "We played on a little summer team together (in New York), and I knew he was going to be good a long time ago. ... He's kind of slowly developed, and I know he's been hurt a little bit, but he had good stuff today."
The Nationals responded to Jacobs' blast with two runs in the bottom of the second on Schneider's double off the base of the right-center field fence.
Washington added to the lead with four runs in the sixth. Ryan Zimmerman followed Felipe Lopez's leadoff triple with a double to center. Austin Kearns drove in Zimmerman with a single to left, and Pena then chased Florida starter Rick VandenHurk (4-5) with a two-run homer to left-center that made the score 6-1.
It was Pena's fifth home run since joining the Nationals on Aug. 17.
VandenHurk pitched 5 1/3 innings, allowing six runs and a season-high eight hits. He walked one and struck out six.
The Marlins loaded the bases with one out in the eighth against reliever Jesus Colome. Second baseman Belliard fielded Cabrera's slow grounder in the hole but overthrew Lopez covering at second, and pinch-hitter Todd Linden and Dan Uggla scored to make it 6-3.
Jon Rauch relieved Colome and walked Josh Willingham to load the bases before striking out Jacobs. He then struck out Ross to end the threat after falling behind 3-0.
"It basically came down to, 'Here it is. Hit it.' And thank goodness he didn't," Rauch said.
The victory gave the Nationals a lead in their own little pennant race with Florida. After widespread predictions of a last-place finish, they are hoping to stay ahead of the Marlins and finish fourth.
"I think it means a lot to the mindset of this team, from the ownership on down," Bergmann said. "No one wants to finish in last, especially where people wrote us off at the beginning of the year."
Hanley Ramirez provided the Marlins with a scare after an awkward swing in the first inning. The Marlins' star shortstop fanned on a high fastball and winced in pain as he dropped the bat during his follow through. Ramirez doubled over while a trainer evaluated him on the field, but he stayed in the game and lined a double to the right-center field gap later in the at-bat.
It took Pena only 48 at-bats to hit five homers for the Nationals. He had five homers in 156 at-bats earlier this season for the Boston Red Sox. ... Cordero has 30 saves for the second time in his last three seasons. ... Jacobs has homered off Bergmann three times, more than any other pitcher. After the game, Bergmann jokingly called Jacobs his "archenemy." ... Florida reliever Harvey Garcia made his major league debut.