ST. LOUIS (AP) -- One more pitch, and Brian Wilson put out the lights for good.
Nate Schierholtz delivered a tying single with two outs in the ninth inning and the go-ahead hit in the 11th, then the San Francisco closer finished off the St. Louis Cardinals after a 16-minute light failure for a 7-5 victory on Wednesday night.
"It was a pretty good game of gamesmanship," Giants manager Bruce Bochy joked. "I was just hoping it wouldn't be too long before he got back out there.
"It wasn't bad, one pitch and we're done."
The game was delayed with two outs in the bottom of the 11th when large sections of two light standards failed. Play resumed with a 2-1 count on Allen Craig , and Wilson needed one pitch to get a game-ending grounder for his 15th save in 17 chances.
"That was really awkward, pretty anticlimactic to have the lights go off like that," Craig said. "But I guess it's just part of the game."
Joe Walsh , the Cardinals' director of security, said a faulty breaker was likely to blame. After flipping the circuit breaker, Walsh said umpires were aware from previous light woes in other stadiums that about 15-20 minutes was required for the lights to cool down and then return to full power.
Cardinals manager Tony La Russa had no idea what happened, saying, "Ask the electrician, I don't know."
Cody Ross had four hits and an RBI and Freddy Sanchez had a three-hit game for the Giants, who shook off a poor outing by Tim Lincecum . Sergio Romo (3-0) worked the 10th for the win.
San Francisco, which came from behind twice, had a season-high 16 hits and won for only the third time in nine games.
"Early on balls were kind of finding holes and finding places to land," Lincecum said. "Pitchers pride themselves on shutout innings after you get a lead and I just didn't do that.
"You have to tip your hat to Craig, he put a pretty good swing on the pitch."
Craig's two-run, pinch-hit homer chased Lincecum in the seventh, putting the Cardinals up 5-4. The two-time NL Cy Young winner struck out nine but gave up a career high-tying 10 hits and threw two wild pitches, one of them scoring a run.
"I faced him in college quite a bit and I watched video on him quite a bit the last few years," Craig said. "I have an idea what he's doing, it's not like I've never faced him before."
Lincecum was 3-1 with a 1.22 ERA in May, allowing only six earned runs in 36 2-3 innings. Before fading in the seventh he had retired eight of nine batters, five on strikeouts with the lone runner on a hit batsman and the pinch homer was the first he's allowed in his career.
Schierholtz and Brandon Crawford had RBI singles in the 11th off Ryan Franklin (1-4), pitching on the second straight night and in his second inning. Ryan Theriot had two hits and an RBI to extend his hitting streak to a career-best 15 games for St. Louis, which gave Jake Westbrook a 3-0 lead in the fourth.
Bochy said he's gaining confidence in Schierholtz.
"His playing time has increased and it will now with the game he had and the way he's been playing," Bochy said. "That's what we're looking for, a shot in the arm."
Aubrey Huff 's homer off Miguel Batista ended a 6-for-38 slump and put the Giants ahead 4-3 in the top of the seventh.
Craig is 18 for 40 (.450) since May 19 and is 5 for 11 with a home run, three doubles and four RBIs in the first three games of a four-game series. He and Jon Jay should both garner more playing time with Matt Holliday set to go on the 15-day disabled list on Thursday with a nagging quadriceps injury.
Lincecum walked on five pitches to load the bases in the fourth after the Cardinals elected to intentionally walk eighth-place hitter Eli Whiteside . Westbrook escaped by striking out Andres Torres , giving the Giants seven stranded runners the first four innings.
Westbrook's only clean inning was the fifth, but the Giants opened the sixth with three straight hits and a sacrifice fly and chased him on Torres' two-out RBI double. Torres had been an easy out his first three at-bats with two strikeouts and a groundout to first.
"I think I got him on the previous three at-bats with all changeups," Westbrook said. "I guess bad location. That can't happen, you can't let them back in the ballgame."
Theriot had an RBI single in the third and the Cardinals made it 3-0 in the fourth on a wild pitch and Skip Schumaker 's single that barely eluded both middle infielders.
NOTES: The Giants' Class A affiliate in San Jose set a team record with its 12th straight victory Tuesday. ... Pat Burrell , in a 4-for-25 slump, fouled out as a pinch-hitter on a 3-0 pitch in the eighth. He's started only eight of the Giants' last 22 games. ... Lincecum has given up 10 hits three times, the previous time on May 15, 2009 against the New York Mets . ... Huff leads the Giants with 24 RBIs but has only four in the last 17 games and had been batting only .175 against right-handers, among the worst in the league, before the homer. ... Lincecum threw one wild pitch his first 11 starts. ... The Giants are 6-3 in extra innings and 2-0 against St. Louis.