SAN FRANCISCO (AP) — Washington had no trouble knocking San Francisco ace Tim Lincecum around.
It was the Giants' bullpen that gave the Nationals fits.
Six San Francisco relievers combined to throw eight shutout innings after Washington built a four-run lead against Lincecum, and the Giants rallied to win 5-4 on Freddy Sanchez's game-ending single with two outs in the 13th inning Monday night.
"Sometimes four is enough, sometimes it's not," Nationals manager Jim Riggleman said. "John (Lannan) did a great job, but it kind of fell apart on us."
Lannan, Washington's starter, pitched seven solid innings but was long gone by the time Sanchez singled in Chris Stewart with the game-winner.
By then, the Nationals squandered their four-run lead along with scoring opportunities in the 11th and 12th innings.
"The game plays out itself and our pitchers did great," said Washington first baseman Mike Morse, who homered for the second consecutive game. "We were one hit away and they were one hit away also."
Stewart, who entered the game as a pinch-hitter in the 10th, drew a leadoff walk against Craig Stammen (0-1) to start the winning rally. After Stammen struck out pitcher Javier Lopez, Andres Torres singled to right. Miguel Tejada hit into a fielder's choice to move Stewart to third before Sanchez lined a 1-1 pitch from Stammen down the line in right.
It was Stammen's first appearance after being called up from the minors on Saturday. Normally a starter, he was pressed into action after Riggleman emptied his bullpen.
"It's different but that's why they pay us to actually play," Stammen said. "I knew I'd have to come in eventually if it kept going and then I'd be counted on for multiple innings. Unfortunately I lasted one inning."
Lopez (3-1) retired all four batters he faced for the victory.
It's the Giants' eighth walkoff win this season, second most in the majors. San Francisco squandered scoring opportunities in the ninth and 10th innings.
Morse homered for the second straight game, but Washington's bullpen struggled.
Both teams missed chances to win the game. Sanchez, the 2006 NL batting champion also had a walkoff winner against Colorado on May 6.
The game lasted nearly 4½ hours and ended at 11:44 p.m. local time.
Washington stranded a runner at second in the 11th and left the bases loaded in the 12th.
That wasted a solid effort by Lannan, who allowed two hits through the first six innings — Torres' leadoff single in the first and a bunt by Tejada in the sixth. The Nationals' left-hander, who lost to the Giants on April 30, extended his streak to 19 innings without allowing an earned run.
The streak ended when Aaron Rowand led off the seventh with his solo homer to left that trimmed San Francisco's deficit to 4-1.
The game was delayed for about five minutes in the third inning when home plate umpire Gerry Davis was injured after getting hit by the mask of Washington catcher Ivan Rodriguez. Tejada hit a foul ball that deflected off Rodriguez's mask and pushed it into Davis' arm, opening a deep cut.
Davis received treatment in the Giants' dugout and returned but left again in the bottom of the fifth. Third base umpire Todd Tichenor replaced Davis behind the plate, and the game continued with three umpires.
It wasn't a much better night for Lincecum.
San Francisco's two-time NL Cy Young Award winner struck out the side in the first before giving up a homer to Morse leading off the second. Lincecum came back to fan Danny Espinosa and Jerry Hairston to reach 1,000 career strikeouts, becoming just the eighth pitcher since 1900 to reach the milestone in his first five seasons.
But Lincecum lasted only five innings and had five strikeouts with three walks. It's the shortest outing by the San Francisco ace since he left after just 3 2-3 innings against San Diego on Aug. 15, 2010.
Morse, who hit his second career grand slam of the season in Sunday's 11-inning win over Arizona, got to Lincecum again with a two-run double in the third to make it 4-0. Morse, a former prospect with Seattle now prospering in Washington, continued his torrid pace and is batting .375 with six doubles, eight home runs and 24 RBIs in 28 games since May 1.
The Giants scored three times in the eighth after Lannan departed. They missed a chance to win it in the ninth after Torres drew a leadoff walk, was sacrificed to second and stole third. Henry Rodriguez, who gave up Nate Schierholtz's game-tying pinch-hit single in the eighth, got Cody Ross to hit a grounder and shortstop Ian Desmond threw Torres out at home. Rodriguez retired Aubrey Huff to end the inning.
San Francisco put two runners on in the 10th against Cole Kimball, but again failed to score.
Notes: Over his past two starts, Lincecum has a 7.94 ERA. ... Morse's home run was the first allowed by Lincecum at AT&T Park this season. ... The Giants rested injured 3B Pablo Sandoval and gave him the night off while rehabbing with Triple-A Fresno. Sandoval had some soreness in his right hand — the same hand he suffered a broken hamate bone in — but still took part in all pre-game work. ... IF Mike Fontenot (groin strain) is expected to begin running and taking batting practice sometime within the next week. ... LHP Barry Zito was scheduled to make an 85-pitch start for Class A San Jose on Monday, the first step in his rehab assignment.