SAN FRANCISCO -- For a team that seemingly had control of the game for the better part of nine innings Tuesday night, the Arizona Diamondbacks sure needed a lot of things to break their way in extra innings to square their three-game series against the San Francisco Giants.
But that they did, with a game-saving throw by Cody Ross and some shoddy Giants defense combining to spell the difference in Arizona's 6-4, 11-inning victory at AT&T Park.
Didi Gregorius scored on a wild pitch with one out in the 11th, and Gerardo Parra hit Santiago Casilla's next offering into left-center field for a run-scoring double as the Diamondbacks, who blew a 4-0 lead in the eighth and ninth innings, recovered in time to snap the Giants' seven-game home winning streak.
In a game that featured stellar pitching by Diamondbacks starter Patrick Corbin, more Giants killing by Paul Goldschmidt, a big-time hit off the bench by San Francisco's Brandon Belt and a picture-perfect throw to the plate by Ross, it was a comedy of errors by the Giants in the top of the 11th that allowed Arizona reliever Brad Ziegler (1-0) to walk away a winner in a game he nearly gave away an inning earlier.
After Ross threw out Pablo Sandoval at home plate by 20 feet on Hunter Pence's two-out bid for a walk-off single in the 10th, Gregorius sliced a one-out drive to left-center field that Andres Torres lost in the lights. Torres then hesitated throwing the ball back into the infield, allowing Gregorius to leg the hit into a double.
Casilla (2-2) then got pinch hitter Alfredo Marte to ground to Sandoval at third base, but first baseman Belt, whose pinch-hit, two-run homer in the bottom of the ninth forced extra innings, couldn't handle a relatively simple, one-hop throw. The error allowed Gregorius to advance to third.
Casilla then uncorked a low fastball that skidded off home plate and through the legs of catcher Buster Posey for a wild pitch. Gregorius race home to break the 4-4 tie.
The run was the first allowed by the Giants bullpen after 15 1/3 scoreless innings.
Parra then plated Marte from second with a shot to left-center, giving Arizona a two-run cushion.
"We've had a lot of games like this, and we've won a lot of them," Goldschmidt said of a Diamondbacks season in which 14 of the 20 games have been decided by two or fewer runs. "Whether we're fighting back from a deficit or trying to hold onto a lead, we're confident we can win it."
Matt Reynolds, with the help of a double-play grounder, pitched a 1-2-3 bottom of the 11th for his first career save.
For the second consecutive game, the Diamondbacks blew a late two-run lead, this time when they were three outs away from sending Corbin to a third consecutive victory to open the season.
After the Giants used a Brandon Crawford triple as the centerpiece of a two-run eighth inning that knocked Corbin from the game and cut a 4-0 deficit in half, it took just two batters in the ninth to get completely even against Arizona closer J.J. Putz.
Pence greeted the right-hander with a solid double, bringing Belt to the plate as a pinch hitter for Joaquin Arias. The Giants' regular first baseman, still batting just .197 despite a walk-off single in the ninth Monday, connected with a two-strike Putz fastball and sent it over the pavilion beyond the right field wall, one-hopping into San Francisco Bay.
"I knew I hit it well," Belt said of his first home run of the season and first career pinch-hit homer, "but I don't think anything is a sure thing here. I've learned my lesson.
"I was just happy to see it go out."
For 7 1/2 innings, it appeared the Diamondbacks were en route to a relatively comfortable win. Goldschmidt and Corbin were the key contributors, Goldschmidt with a double, home run and three RBIs while Corbin was carrying a shutout into the eighth inning.
The Diamondbacks gave Corbin an immediate cushion with a two-run first inning that included a run-scoring double by Goldschmidt, then doubled their advantage when the Arizona first baseman took Giants starter Matt Cain about 15 rows deep in the left field bleachers with a two-run shot in the third.
The home run not only was Goldschmidt's seventh against the Giants -- his most against any foe -- but also was the fifth of his career in just 57 at-bats at AT&T Park. Including his run-scoring double, he had amassed 17 RBIs and a .368 batting average over that span.
"I have no idea," Goldschmidt responded when asked to explain his unusual success against the Giants. "These things can change in a hurry, so you try not to think too much about it."
Even while suffering their first loss on a homestand that's now five games old, the Giants kept their fans up late, scoring twice in the eighth and putting the potential tying runs on base after Corbin surrendered a sharp single to the last batter he faced, Angel Pagan.
But David Hernandez, who offered up a game-tying home run to Posey on Monday night, came on with one out and won a rematch with the reigning National League Most Valuable Player, getting him to fist a weak popup to second base.
Putz couldn't finish the job in the ninth, however, sending the game into extra innings.
NOTES: Goldschmidt entered the game with the fifth-best slugging percentage (.587) and sixth-best on-base percentage (.416) among Giants opponents with at least 75 career plate appearances against the team. ... The Diamondbacks are now 4-0 in Corbin's starts, while the Giants fell to 0-5 with Cain on the hill. Cain has now allowed six home runs in his past 17 innings. ... The Giants made a season-worst three errors, two of which led to unearned runs. ... Arizona's Ian Kennedy squares off with San Francisco's Madison Bumgarner in the series finale Wednesday afternoon, after which the Diamondbacks head home for seven in a row and the Giants take off on a six-game trip that wraps up next week in Phoenix. ... The Diamondbacks have won the series finale against all six previous opponents this season. ... A six-foot marker placed by the Giants on the brick wall beyond the fence in right-center field at AT&T Park commemorating Barry Bonds' record-breaking 756th career home run has gone missing. The club announced it is studying surveillance tapes from the past week in an effort to figure out what happened.