Pablo Sandoval hit a go-ahead two-run single in the sixth to help Barry Zito end a six-start winless stretch, and the San Francisco Giants beat the Oakland Athletics 5-2 on Thursday to avoid a season sweep.

A day after San Francisco made three errors and two other defensive miscues, the Giants finally got to A.J. Griffin (5-4) to snap the A's six-game winning streak with their lone win in the four-game Bay Bridge Series between last year's West division champions.

Brandon Belt doubled in two runs in San Francisco's four-run sixth.

Zito (4-3) won against his former club for his first victory since beating San Diego at home April 21. The Giants improved to 7-0 in his home outings and have won 13 straight regular-season games started by Zito at AT&T Park.