OAKLAND, Calif. (AP) — Hunter Pence hit a three-run homer and Nick Hundley added a two-run shot to back a stellar start by Jeff Samardzija, and the San Francisco Giants beat the Oakland Athletics 10-4 on Tuesday night.

Brandon Belt homered leading off the fourth inning for San Francisco, which snapped a four-game losing streak. The Giants' five runs in the first matched their most in any inning this year, and their three homers also equaled a season high.

Samardzija (6-11), now one of last-place San Francisco's most steady pitchers after an 0-5 start, struck out five over eight innings to win consecutive outings for the second time this year.

Matt Joyce hit a two-run homer and a sacrifice fly for the A's.

The Bay Bridge Series now shifts to San Francisco's AT&T Park for the final two games.