SAN FRANCISCO (AP) -- Madison Bumgarner is back on track. After a couple of rough starts in May, he pitched another gem.
Bumgarner made one mistake Wednesday, leaving a ball up to Bryce Harper.
Harper's leadoff home run in the sixth was the only blemish for Bumgarner, who gave up four hits in seven innings.
Harper doubled in the 10th and scored on Ian Desmond's single to give the Washington Nationals a 2-1 victory over the San Francisco Giants and avoid a three-game series sweep.
Bumgarner's first four outs were by strikeouts, as were five of the first eight. He did not strike out a batter after the third inning.
Bumgarner bounced back from allowing a career-high nine runs -- seven earned -- in a season-low 4 2-3 innings last Friday at Colorado.
"We know what everybody can do," Bumgarner said. "We're going to have some struggles here and there. I don't think anybody is too worried about it."
Ryan Zimmerman was walked intentionally before Desmond came up with his big hit against Jeremy Affeldt (1-1) in the 10th.
"We're only going to go as far as our starting pitching will take us," Affeldt said. "The way they are keeping us in ballgames and giving us a chance to win is huge."
Buster Posey hit a tying RBI single for San Francisco in the eighth. Marco Scutaro went 0 for 3 with two walks, ending his 19-game hitting streak. He flied out to deep left to end the game.
"We played well again today," Giants manager Bruce Bochy said. "Really it was their defense in the eighth that won the game. They made nice plays on Pence and Belt. We ran into a well-pitched game."
Both teams failed to muster much offense in a nice pitchers' duel between Gio Gonzalez of the Nationals and Bumgarner.
"It's never easy to give it up like that but I think we'll be OK," Bumgarner said. "They have a good team over there and they have as good a shot as anybody to be there in October."
Gonzalez was charged with one run and four hits over 7 1-3 innings, throwing a season-high 116 pitches.
Harper said he was excited about facing Bumgarner.
"The kid is unbelievable," Harper said. "He's one of the best I've faced all year. He's a tough match up for me. It was a lot of fun facing him."
NOTES: Attendance at AT&T Park reached 1,040,301 for the season in home game No. 25. ... RHP Tim Lincecum (3-3, 4.70 ERA) starts Friday's game for the Giants against the Colorado Rockies. ... Giants INF Pablo Sandoval was not in the starting lineup because of an illness. ... Giants 1B Brandon Belt felt tightness in his back and did not start. ... The Giants are 4-4 in extra-inning games. Giants OF Andres Torres had two doubles.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.