SAN FRANCISCO (AP) -- Pinch-hitter Jake Smolinski hit a go-ahead, three-run homer during Oakland's five-run eighth inning that carried the Athletics to a 13-11 victory over the San Francisco Giants on Tuesday night.
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 and cap their best road trip in nearly three years.
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.
Brandon 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.
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 center fielder Denard 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.
Ryan Madson got six outs for his 15th save in 18 chances despite allowing back-to-back homers to Jarrett Parker and Span to start the ninth. Madson escaped by striking out Buster Posey and Crawford with a man on to end the game after 3 hours, 53 minutes.
This was a topsy-turvy game that saw the Giants break 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 was reinstated from the DL and OF/INF Max Muncy was optioned to Triple-A Nashville. Reddick had been out since May 20 with a broken left thumb. He 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 night's game, leading to more tests. Giants manager Bruce Bochy said the team should know by Wednesday if Panik will need 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 four-game Bay Bridge 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.