The first two balls were launched to deep center field, landing with a thud in the red seats below the stadium restaurant. The third ball was skied to right, finally nestling among the first few rows above the out-of-town scoreboard.

It was that one that meant the most to Nationals slugger Adam Dunn. Not because it was the first time in his career he had hit three home runs in one game. But because it proved to be the game winner in a nail-biting 7-6 victory over the San Diego Padres on Wednesday night at Nationals Park.

“I don’t feel any different than I have in the past,” said Dunn, who belted home runs No. 18, 19 and 20 and earned a curtain call from the home fans after his eighth-inning blast put Washington up 7-5. “It’s just that I got pitches to hit tonight and didn’t foul them off like I’ve been doing. It was a pretty cool deal. But the main thing, obviously, is to win.”

And now the Nats (38-47) have done that twice against a Padres team that entered this series with the best record in the National League. San Diego (49-35) has fallen a half-game behind the Atlanta Braves (50-35) for that honor – an unexpected development considering it employs the sport’s top pitching staff and Washington’s offense has struggled for weeks. But in two games the Nats have scored 13 runs against the Padres and hit seven home runs in the scorching, dry air that has invaded the District in recent days.

“Their pitching staff is unbelievable,” Dunn said. “For us to be able to score runs like we’re scoring it’s just a lot of hard work and it’s finally paying off. We have a few guys swinging the bat a little better now.”

The Nats entered the series with a 16-32 record since May 14. The 2010 season had fallen apart in one horrid seven-week stretch and the freefall showed no signs of abating. But with the All-Star break looming they have at least won five of their last eight games to build momentum and creep a little closer to .500.

Washington was busy from the very first inning. Ryan Zimmerman produced an RBI single. Dunn then crushed a Jon Garland (8-6, 3.56 ERA) pitch into the red seats in center field for a three-run homer and a 4-1 lead.

It didn’t take long for him to do it again. Dunn hit his second of the night to about the same spot in center. That one was a solo shot in the third inning and put Washington up 5-2. Ian Desmond, who had one of his team’s three homers on Tuesday night, scalded a ball over the fence in dead center in the sixth to make it 6-2.

Meanwhile, Adrian Gonzalez and Chris Denorfia each hit a solo homer for San Diego to keep it close. Gonzalez also doubled home a run in the third. Nats reliever Drew Storen gave up two runs in the eighth as San Diego trimmed the lead to 6-5. But Dunn added an insurance run in the bottom of that frame by lofting a homer to right. Moments later he was out of the dugout answering a curtain call from the sweltering crowd of 13,762.

“It’s always fun to watch the big guy hit home runs and run around first base blowing bubbles,” Desmond said. “He’s a good [teammate]. It’s fun to see him doing well.”

Matt Stairs hit the game’s seventh homer off Nats closer Matt Capps in the ninth. There were anxious moments as San Diego pushed runners to second and third with two out before Chase Headley grounded out to first base to end it. J.D. Martin earned his first win of the season in seven starts for Washington. He is 1-4 with a 3.35 ERA. Martin gave up two runs on six hits with a walk in 5 2/3 innings and struck out four San Diego batters. Capps earned his 23rd save of the season. But Dunn’s career night was the story.

“It was a great performance,” said Nats manager Jim Riggleman. “Any time a guy hits a couple home runs much less three that’s a big night. But [Dunn] is a big-time hitter and he’s really been coming through for us big time for a month now.”

bmcnally@washingtonexaminer.com