SAN FRANCISCO (AP) After nearly 4 hours and more than 350 pitches in a topsy-turvy game that featured nearly as may momentum swings as big hits, Oakland closer Ryan Madson said the only games he enjoyed more in his career were when he won a championship.
This game might have lacked the stakes of October baseball but not the drama.
Pinch-hitter Jake Smolinski hit a go-ahead, three-run homer during Oakland's five-run eighth inning and Madson survived a dicey ninth for a six-out save that carried the Athletics to a 13-11 victory over the San Francisco Giants on Tuesday night.
''It was a whirlwind game,'' Madson said. ''That was the funnest game I've been a part of for a long time - maybe minus just the two clinching games in the World Series. This was No. 3 probably.''
The A's overcame a pair of three-run deficits by scoring four runs in the sixth and five in the eighth to win their second straight game in the Bay Bridge Series.
Khris Davis hit his 19th homer, and Stephen Vogt, Billy Butler and Josh Phegley each drove in two runs to help the A's finish a 5-1 trip that started with three wins in four games against the Angels. This was Oakland's most successful road trip of at least four games since also going 5-1 in September 2013.
But it didn't come easy even after the A's scored three insurance runs in the ninth to stake Madson to a four-run lead. Back-to-back homers by Jarrett Parker and Denard Span to open the inning cut that advantage in half.
But with Sean Doolittle unavailable because of soreness, Madson had to stay in. Angel Pagan then drew a walk before Madson got Brandon Belt to fly out and struck out Buster Posey and Brandon Crawford to end his 43-pitch outing and the game.
''That was some game, so many different swings,'' A's manager Bob Melvin said. ''To get two innings out of Madson like that was Herculean.''
Crawford had three hits and five RBIs for the Giants, including a bases-loaded triple that put San Francisco up 8-5 in the sixth.
But the bullpen couldn't hold it, giving up 10 runs in 3 1/3 innings.
''They're big boys,'' Giants manager Bruce Bochy said. ''They have to deal with this like all of us do. They're going to have their moments. They've really done a good job. This was one of those wild games. You have one of these games once in a while. Hopefully you come out on top but we didn't.''
Cory Gearrin walked the first two batters in the eighth before allowing an RBI single to Marcus Semien. Javier Lopez (0-2) entered and was saved when Span made a spectacular running catch to rob Phegley of a potential tying extra-base hit.
The reprieve lasted just one batter as Smolinski followed with the drive into the left-field seats that put Oakland up 9-8.
Jed Lowrie added an RBI single later in the inning and Phegley hit a two-run double in the ninth for some insurance.
Zach Neal (1-1) pitched one inning for his first major league win.
The Giants broke out to a 4-1 lead before the teams traded four-run frames in the sixth. Oakland went ahead when Vogt hit a two-run double off reliever George Kontos and Butler delivered a pinch-hit, two-run single after an error by third baseman Conor Gillaspie extended the inning.
But Gillaspie led off the bottom half with one of his four hits and scored the tying run on Span's double. Later in the inning, Crawford made the A's pay for intentionally walking Posey by hitting a three-run double that put San Francisco up 8-5.
Athletics: OF Josh Reddick returned from a DL stint for a broken left thumb and went 1 for 6. ... LHP Rich Hill is expected to return to the rotation Saturday against Pittsburgh. He has been out since injuring his groin May 29.
Giants: 2B Joe Panik was scratched from the lineup with symptoms of a possible head injury. Panik was hit by a pitch June 18 by Tampa Bay's Matt Moore and passed three days of tests after that. He complained of symptoms after Monday's game, leading to more tests. The Giants will decide Wednesday if Panik needs to be placed on the DL.
Athletics: RHP Sean Manaea (2-4) returns from a DL stint for a strained forearm to take the mound when the series shifts to Oakland for the final two games.
Giants: Jake Peavy (4-6) looks to keep up his strong pitching of late. Peavy has a 1.91 ERA in his past six starts after beginning the year with a 1-5 record and 8.21 ERA in his first nine outings.