SAN FRANCISCO - Giants manager Bruce Bochy didn't have a problem with third base coach Tim Flannery trying to get burly Pablo Sandoval to score from second base on a two-out hit in the 10th inning.
Even if it cost the defending World Series champions a shot at winning, Bochy liked the aggressiveness from both the coach and player.
Sandoval was thrown out at home plate by Arizona right fielder and former teammate Cody Ross, and the Diamondbacks scored twice in the 11th to beat San Francisco 6-4 on Tuesday night.
"We got the hit we were looking for," Bochy said. "(Ross) just made the play. Ross charged it and threw a bullet home."
The loss snapped the Giants' seven-game winning streak at home, though they didn't go quietly.
San Francisco trailed 4-0 before scoring twice in the eighth and tying it in the ninth on pinch-hitter Brandon Belt's two-run homer.
After Sandoval was thrown out to end the 10th, the Diamondbacks won when Didi Gregorius scored the go-ahead run on a wild pitch by Santiago Casilla in the 11th.
Gregorius hustled for a one-out double off Casilla (2-2) when left fielder Andres Torres fielded the ball nonchalantly. Pinch-hitter Alfredo Marte reached when Belt was charged with an error for bobbling a throw to first from Sandoval. Casilla then threw a wild pitch to Gerardo Parra that bounced to the backstop, allowing Gregorius to score.
"We talk about it all of spring training, run hard out of the box," Arizona manager Kirk Gibson said. "(Gregorius) gave himself a chance to make a play, and it was huge."
Parra followed with an RBI double to make it 6-4.
San Francisco got the potential tying run to the plate in the bottom of the 11th, but Matt Reynolds got Torres to ground into a double play and then retired Brandon Crawford for his first career save.
Brad Ziegler (1-0) pitched a scoreless inning for the win.
The Diamondbacks, who twice blew two-run leads in Monday's 5-4 loss in the series opener, led 4-0 before the Giants rallied late. They tied it on Belt's drive off closer J.J. Putz, who has blown three saves in six tries this season.
The loss ended San Francisco's nine-game winning streak against NL West opponents.
Arizona took a 2-0 lead against Giants starter Matt Cain in the first with some help from San Francisco's defence.
Crawford bobbled Parra's grounder to shortstop for an error and Martin Prado followed with a single. Paul Goldschmidt's looping double that landed just inside the foul line near the Diamondbacks' bullpen drove in Parra, and Prado scored on Miguel Montero's groundout.
Goldschmidt's two-run homer on a 3-1 pitch from Cain in the third put Arizona up 4-0.
Cain, an All-Star each of the past two seasons, gave up four runs in six innings and lowered his ERA from 7.15 to 6.59. He had six strikeouts and walked one but remains the only San Francisco starter without a win this season.
It's also the longest Cain has gone winless to begin a year since his third full season in 2008 when he didn't get his first win until his sixth start.
"The first inning he had bad luck," Bochy said. "I thought he regrouped and threw the ball well."
Arizona starter Patrick Corbin carried a shutout into the eighth but left with his second straight no-decision after another meltdown by the Diamondbacks' bullpen. Corbin allowed six hits, struck out seven and didn't walk a batter for the first time this season. He also doubled in the seventh for his first hit of the year.
Torres singled leading off the eighth and scored on Crawford's triple. Pinch-hitter Hector Sanchez's groundout drove in Crawford to cut Arizona's lead to 4-2.
After Angel Pagan singled, David Hernandez replaced Corbin and retired Marco Scutaro. Sandoval singled Pagan to third but Hernandez, who a night earlier gave up a tying homer to Buster Posey, got the NL MVP to pop out softly to end the inning.
Pence doubled off Putz to open the ninth before Belt hit his first career pinch-hit homer, a towering shot into the right-field arcade.
NOTES: Giants closer Sergio Romo had not issued a walk in 38 straight appearances until Ross drew a free pass in the 10th. ... Cain has allowed six home runs over his last three starts. ... RHP Ian Kennedy (1-2) pitches for Arizona on Wednesday and is unbeaten in his last seven games against San Francisco. ... Giants LHP Madison Bumgarner, who starts the second game of the series, was winless in three games against the Diamondbacks in 2012.