Derek Norris hit a three-run shot with two outs in the ninth inning for his first major league home run, and the Oakland Athletics walked off with a stunning 4-2 victory over the San Francisco Giants on Sunday.

Norris hammered a full-count pitch from Santiago Casilla (1-3) over the left-field wall to help the A's avoid the first three-game sweep by San Francisco in Oakland. A's players streamed out of the dugout in those bright gold uniforms and mobbed Norris at home plate.

It was Casilla's second blown save in 22 chances this season. The ending also washed away San Francisco starter Matt Cain's bid for a ninth straight win.

Jim Miller (2-0) pitched 1 1-3 scoreless innings for the victory.