OAKLAND, Calif. -- Twelve pitchers combined to throw 385 pitches in a game that lasted 4 hours, 15 minutes -- among the longest nine-inning games the Athletics and Giants have played.
After a wild finish, Brandon Belt's big swings were nearly forgotten in it all.
Belt hit a go-ahead two-run homer in the sixth inning, Buster Posey added a two-run drive in the seventh, and the San Francisco Giants backed Madison Bumgarner's fourth straight win with just enough offense, holding on for a 9-8 victory over the Oakland Athletics on Saturday.
A night after the Giants rallied in the ninth inning to win 5-4 in the opener of the second Bay Bridge Series between the Bay Area rivals, Oakland nearly paid them back after trailing 9-4 to start the ninth.
"To come away with a win when you're on the ropes like that, it's big," Giants manager Bruce Bochy said. "This would have been hard to take."
After Shane Loux gave up Brandon Inge's two-out single in the ninth, Santiago Casilla entered and allowed Derek Norris' run-scoring single for his first career RBI before walking Brandon Moss to load the bases. Casilla then allowed Brandon Hicks' two-run ground-rule double.
Javier Lopez replaced Casilla and walked Seth Smith to put runners on the corners, then Clay Hensley -- the 12th pitcher of the game and San Francisco's fourth of the inning -- came in and got Jemile Weeks on a fly to shallow center caught by second baseman Ryan Theriot to end the long game for his second save in three chances.
Bumgarner was shaky early and allowed a season-high 11 hits. The left-hander and likely All-Star (9-4), facing Oakland for the first time in the regular season, hung tough until his hitters delivered. He is unbeaten in five starts since a defeat at Miami on May 26.
Josh Reddick hit a two-run homer in the first and an RBI single in the second, then Jonny Gomes added a solo shot to start the third. Oakland's rally fell just short in the ninth despite a 15-hit night.
A's first baseman Moss tied a major league record by a first baseman with three errors in an inning. He became the seventh player to do it with his sixth-inning fumbles and the first since Jack Clark with St. Louis on May 25, 1987.
The Giants tied the game in the sixth on the first two errors by Moss, who first booted Pablo Sandoval's grounder and the ball skipped over his glove and into the dirt in the visiting bullpen. Then, trying to retrieve it, Moss slipped and the ball skipped even further away as two runs easily scored.
After Belt's homer, Moss made yet another blunder -- his third error of the inning -- with an assist from reliever Jerry Blevins and couldn't secure the low throw.
"Moss had a tough day over there. Typically we don't make four errors," manager Bob Melvin said. "I think you have to give him a little bit of a pass. He's new over there and still learning. He's been good to this point."
Belt also hit an RBI single in the second and has a career-best, 11-game hitting streak, with four home runs and 12 RBIs during that span. He's hitting .360 in June.
"It's more a feel for me," Belt said. "It's been a lot of hard work in the cage."
Bumgarner, who has been the most reliable starter in the Giants' rotation, had already given up a season high in hits in the third inning and reached 62 pitches after throwing 20 in the third. He struck out six and walked one in six innings.
Tyson Ross (2-7), called up before the game for his third stint of the season with Oakland, allowed five runs -- three earned -- on four hits in 5 1/3 innings, struck out three and walked four. The right-hander fielded four groundouts in the first four innings.
Angel Pagan returned to the Giants lineup as designated hitter and went 1 for 3 after sitting out Friday with an abdominal strain. He is slated to return to center field in Sunday's finale. Nate Schierholtz drew a bases-loaded walk by Jordan Norberto in the seventh -- sixth this season by an A's pitcher.
Home plate umpire Tony Randazzo had a scare in the fifth when a 1-2 pitch from Ross hit off Gregor Blanco's foot and bounced into Randazzo's left throat area. He was examined by A's trainer Nick Paparesta and stayed in the game.
Randazzo ejected Oakland's Coco Crisp after the sixth, when the A's leadoff hitter was called out on strikes and could be seen yelling from the dugout.
Norris, promoted Thursday from Triple-A Sacramento, singled with two outs in the fifth for his first major league hit.
Oakland scratched scheduled Sunday starter Brandon McCarthy because of recurring shoulder soreness. He beat the Dodgers on Tuesday pitching on 11 days' rest.
"It seems like the last two weeks have been as mentally harrowing as I've had to deal with in my career," he said. "I feel miserable. I'm obsessing over the pain. I feel like I've done everything I could do but there are so few answers right now. The frustration level has gone off the charts."
A's LHP Brett Anderson, rehabbing from Tommy John elbow-ligament replacement surgery, threw a 20-pitch bullpen session of just fastballs in his first time off the mound since briefly being shut down last month because of forearm tightness. ... Giants hitting coach Hensley "Bam Bam" Meulens celebrated his 45th birthday. ... A's broadcaster and former catcher Ray Fosse, made a point to stop into the Giants clubhouse and meet Posey for the first time. They have something in common considering Posey's season-ending collision at the plate with the Marlins' Scott Cousins on May 25, 2011. "I was very vocal that I thought it was an unnecessary hit," Fosse said. ... The game drew a sellout crowd of 36,067, which included 1,000 standing room tickets.