PHOENIX -- Brandon Belt homered, singled and drove in three runs to help the San Francisco Giants stop a five-game losing streak with a 6-4 victory over the Arizona Diamondbacks on Monday.
Belt's two-out, two-run single off Brad Ziegler in the top of the eighth inning broke a 4-4 tie, and right-hander Jean Machi (1-0) got his first major league victory.
Rookie third baseman Nick Noonan led off the eighth with his first career double, and Ziegler (1-1) issued two-out walks to Gregor Blanco and Brandon Crawford to bring up Belt, who hit a 3-1 pitch up the middle.
Jason Kubel, Eric Chavez and Martin Prado homered five batters apart in the fourth inning to give Arizona a 4-3 lead against Matt Cain. The Giants starter has given up nine homers in his past four starts, and he's 0-2 with a 6.49 ERA in his first six starts.
Pablo Sandoval's RBI single tied the game at 4 in the fifth. Sandoval, a career .353 hitter at Chase Field, left in the bottom of the sixth with what the Giants called right elbow discomfort.
Sergio Romo pitched the ninth for his ninth save.
Marco Scutaro had three hits and Sandoval two.
Prado had two hits in his return to the lineup after his first day off of the season Sunday while fighting a 5-for-39 (.128) slide.
Arizona had won five of its previous six.
The Giants used singles by Marco Scutaro, Sandoval and Blanco and a sacrifice fly by Hunter Pence to take a 2-0 lead in the first inning off Ian Kennedy, who had limited them to one run and four hits in a no-decision at AT&T Park on April 24.
Belt led off the second inning with his second homer of the season, both against the D-backs. His ninth-inning homer tied an April 23 game in San Francisco at four before the D-backs won 6-4 in 11 innings.
NOTES: Giants manager Bruce Bochy was ejected by first base umpire Bill Miller after Pence was called out at first to complete a fifth-inning double play. It was Bochy's first ejection of the season, the 58th of his career. ... San Francisco placed left-hander Jose Mijares on the bereavement list after the passing of his grandmother, who suffered a heart attack in Venezuela on Sunday. The Giants promoted right-hander Sandy Rosario from Triple-A Fresno. ... Arizona left-hander Patrick Corbin is one of three pitchers in the major leagues to have allowed two or fewer runs in six or more innings in all of their five starts. Boston's Clay Buchholz and the Chicago Cubs' Travis Wood are the others. Corbin is 3-0 with a 1.91 ERA after a 4-2 victory over Colorado on Sunday.