SAN FRANCISCO -- Marco Scutaro had just rounded first base when the portly Pablo Sandoval caught him by surprise, tugged on his jersey and bear-hugged the second baseman while the rest of the San Francisco Giants streamed out of the dugout in celebration.
"He said, 'Take it easy. I'll protect you,'" Scutaro said. "That's a lot of protection."
Throughout a wild, wacky game that featured 30 hits, 17 runs and 13 pitchers, protection proved to be a theme for a Giants team that refused to quit. They built a 4-0 lead, then trailed by three and blew a chance to win in the ninth.
Only fitting they showed the same fight at the finish.
"That's probably one of the best wins," Posey said, "if not the best win of the year."
Brandon Crawford beat out a single to short leading off the final inning and moved to second when Brett Pill dropped his first career sacrifice bunt. Angel Pagan grounded out to first to advance Crawford to third.
Scutaro sent the final fastball from Bryan Shaw (1-5) past diving third baseman Chris Johnson for San Francisco's seventh walk-off win this season. Scutaro, the former super-sub in Oakland who came over in a trade with Colorado after the All-Star break, also doubled and scored the tying run in the ninth to help hand J.J. Putz his second straight blown save.
Putz had converted 19 consecutive saves until blowing a chance in a loss to the Dodgers on Sunday.
"Tremendous comeback," Giants manager Bruce Bochy said. "It's a little different in September, there's no getting around it."
Sergio Romo (4-2) struck out two in a perfect inning for the Giants to earn the win.
Scutaro hit a double to left leading off the ninth against Putz and moved to third on Sandoval's groundout. Posey doubled down the left-field line to score Scutaro.
Putz intentionally walked Hunter Pence and struck out Xavier Nady swinging. With a full count and an announced sellout crowd of 42,045 roaring to its feet, he struck out Hector Sanchez and quieted AT&T Park.
At least for a little, anyway.
The Giants, coming off a 5-1 road trip against Chicago and Houston, returned home with a 4½-game lead over the Dodgers in the NL West. The loss gave Arizona, now 11½ back of San Francisco, another blow to its fading playoff hopes.
"I got beat. I didn't make a pitch when I needed to, bottom line," Putz said. "It was a (expletive) pitch to Scutaro to start the inning. That's not the way you want to start."
The Giants handed starter Barry Zito plenty of support in the first inning and looked poised to pull away early.
On a relatively warm, windless day by San Francisco standards, the ball carried well all afternoon. Posey's fly drifted over the head of right fielder Justin Upton and off the scoreboard for a double that scored Scutaro. Pence followed with a two-run triple and Sanchez's infield single gave the Giants a 4-0 lead.
Zito struck out five of the first seven he faced and had Arizona's hitters chasing pitches all over the zone and in the dirt -- until he didn't.
In the fifth, Johnson sent an 80 mph cutter over the wall in left for his 14th home run, a two-run shot that sliced San Francisco's lead to 4-2. Zito was replaced by Guillermo Mota after allowing consecutive singles to Upton and Jason Kubel to open the sixth.
Arizona sent ten batters to the plate in the inning while getting an RBI from five different players -- Johnson, Paul Goldschmidt, Willie Bloomquist, Chris Young and Aaron Hill -- to take a 7-4 lead. Goldschmidt's double was the only extra-base hit.
Zito gave up four runs and seven hits and struggled to go deep for the second straight start. Arizona starter Patrick Corbin followed suit, allowing four runs and seven hits in five innings. Both struck out six and walked none.
Zito left with a 4-2 lead, a light ovation from fans and a mess Mota couldn't clean up. Mota, who came back last week following a 100-game suspension for his second positive drug test, gave up two hits, a walk and was charged with three runs before the boo-birds pelted the pitcher.
Sandoval singled home Pagan in the seventh as San Francisco began its own rally.
After Upton added an RBI single for Arizona in the eighth, Crawford hit an RBI double and pinch-hitter Brandon Belt followed with a two-out single to bring the Giants within a run. David Hernandez, who started the inning, got Pagan out on hard line drive to right field for the final out of the eighth.
"That's in the bonus column right there," Zito said. "It's those ones that really make the difference when the year is over."
Aubrey Huff's pinch-hit single for the Giants in the seventh was his first hit since June 10 against Texas. ... The game marked the 150th consecutive sellout for San Francisco. ... Giants LHP Madison Bumgarner (14-9, 3.07 ERA) starts against Arizona RHP Trevor Cahill (9-11, 4.02 ERA) on Tuesday.