Ryan Langerhans hit a 10th-inning homer, the Nationals' fifth of the game, and Washington recovered from blowing a two-run lead in the ninth to beat the Atlanta Braves 8-5 on Saturday night.
The Nationals matched their season high for homers, including two by Elijah Dukes. Langerhans' go-ahead shot in the 10th off Mike Gonzalez (0-2) was his second this season, both as a pinch hitter.
Dukes had four hits, including a run-scoring single in the Nationals' three-run 10th inning, and drove in three runs.
The Braves rallied from a 5-3 deficit against Joel Hanrahan in the ninth. Kelly Johnson tied the game with a bases-loaded double, but the drive bounced over the wall for a ground-rule double, preventing the winning run from scoring.
"It was a fortunate bounce for us," Dukes said. "If the ball doesn't bounce over the wall, the game is over."
The Nationals rebounded from the third blown save in 10 chances for Hanrahan (6-3).
"It's not my job to go out there and get wins," Hanrahan said. "Starting pitchers are supposed to get wins. Wins for me don't look good."
Langerhans, who began his career with Atlanta, homered leading off the 10th.
"You definitely want to try to get the momentum back in a hurry when you go into extra innings like that," Langerhans said. "To put us right back in the lead felt really good."
Gonzalez said Langerhans hit a curveball, which the left-handed reliever said normally is one of his best pitches against left-handed hitters.
"Most of the time they swing over it," said Gonzalez, who gave up three runs while recording only one out. "One of those things: I see a lefty, it was in the bag. It was in my pocket. That's how it is. Didn't happen today."
The Nationals added two more runs in the 10th.
With one out, Cristian Guzman tripled past a diving Omar Infante in left field. Ryan Zimmerman drove in Guzman with a double off Gonzalez and scored on Dukes' single off Jorge Julio.
Steven Shell pitched a perfect 10th for his second save.
Willie Harris and Zimmerman hit third-inning homers off Mike Hampton.
Washington's Tim Redding gave up five hits and three runs, two earned, in six innings but was denied his third straight win.
Casey Kotchman, who had two hits, led off the ninth with a single off Hanrahan and moved to third on Jeff Francoeur's double.
Hanrahan walked pinch-hitter Greg Norton, loading the bases, before striking out Josh Anderson.
Two runs scored on Johnson's ground-rule double, but Brent Lillibridge, who was running for Norton, had to return to third base. If the ball had remained in play, Lillibridge would have easily scored the winning run.
"I knew right away it bounced -- and not our way," said Johnson, who stood on second base, holding his head in his hands, after realizing Lillibridge had to return to third base.
Said Francoeur: "That's our season in a nutshell tonight. That's unbelievable."
Hanrahan issued an intentional walk to Chipper Jones, again loading the bases. Brian McCann grounded out to end the inning.
Dukes had his second career two-homer game in a span of 10 days, hitting line-drive shots into the left-field seats in the second and fourth. Dukes also hit two homers Aug. 28 in an 11-2 victory over the Los Angeles Dodgers.
Hampton gave up eight hits, including a career-high four homers, and five runs -- four earned -- over seven innings.
The Braves hit one homer, a fourth-inning shot to right-center by Yunel Escobar, and stayed close with two runs in the second on Brandon Jones' sacrifice fly and Gregor Blanco's RBI single.
Escobar's homer cut Washington's lead to 4-3, but the Nationals added an unearned run off Hampton in the seventh. Emilio Bonifacio reached second on Chipper Jones' error at third base. Pinch-hitter Anderson Hernandez drove in Bonifacio with a single.
The Nationals also hit five homers on June 10 at Pittsburgh. ... Washington manager Manny Acta said he is moving RHP Jason Bergmann to the bullpen, clearing a spot for rookie RHP Shairon Martis in the rotation. ... Hampton has allowed three homers in a game six times, most recently Aug. 29, 2002, against San Francisco while with Colorado.