Brandon Belt's two-out, two-run single in the eighth inning broke a 4-4 tie and proved to be the difference as the Giants beat the Diamondbacks 6-4 in the opener of the three-game series at Chase Field.
The win snapped a season-high five-game losing streak for San Francisco.
The Giants jumped on starter Ian Kennedy for two runs in the first and a run in the second on Belt's second home run of the season.
The D-backs finally got to Matt Cain in the fourth. After a leadoff walk to Cody Ross, Jason Kubel and Eric Chavez hit back-to-back home runs, the first time the Diamondbacks have hit back-to-back home runs this season. Two batters later Martin Prado added a two-out solo shot for the fourth run in the inning and a 4-3 advantage.
Kennedy, winless in his last five starts, surrendered the lead the very next half inning. Pablo Sandoval singled to right, scoring Marco Scutaro to tie the game at four.
It stayed knotted until the eighth. Ziegler replaced Kennedy and promptly gave up a leadoff double to Nick Noonan, who had replaced Sandoval earlier. Ziegler retired the next two hitters before walking the bases loaded ahead of Belt.
The loss, coupled with the Rockies win in L.A., dropped the D-backs out of first place.
Prado ended an 0-for-12 slump with a base hit in the third inning. He finished the game 2-for-5, for his first multi-hit effort in 15 games. He had been hitting .133 (8-for-60) since April 13.
Gerardo Parra went 0-for-5, snapping a career-high 13-game hitting streak, which had been the longest active streak in the National League.
Cain has allowed nine home runs this season (34.2 IP), matching his total from all of 2011 (221.2 IP). He allowed 21 home runs last season.
Stats of the game:
Belt is 6-for-11 with two home runs and six RBI in four games against the Diamondbacks this year. He is hitting .197 (14-for-71) with no home runs and five RBI against the rest of the National League.
Scutaro, 3-for-4 with two runs scored, is hitting .404 (23-for-57) in his last 14 games against the Diamondbacks.
• The Diamondbacks hit three home runs in an inning for the first time since August 11, 2010 at the Milwaukee Brewers, a game in which they hit four home runs in the fourth inning. For Cain, it was the first time in his career that he allowed three home runs in an inning.
• Sandoval was removed from the game in the sixth inning because of right elbow discomfort, according to the team.
He Said It:
"I think maybe just a little bit of a lack of aggression," Ziegler said of his struggles in the eighth inning. "Trying to make the pitches too good on the edge and just not attacking enough and making them put the ball in play and kind of forcing the issue."
The Diamondbacks and Giants play game two of their three-game series: Trevor Cahill (1-3, 3.00) vs. Madison Bumgarner (3-0, 1.87).
Cahill earned his first win of the season his last time out. He pitched five innings, giving up an unearned run against the Rockies on April 25. It will be his fourth straight start against the NL West. Bumgarner, meanwhile, is undefeated in five starts. He owns a 3-3 mark with a 3.45 ERA (22 ER, 57.1 IP) in 10 games (nine starts) against the D-backs in his career.