PHOENIX -- Marco Scutaro and Brandon Belt homered in support of starter Chad Gaudin's solid outing, and the San Francisco Giants beat the Arizona Diamondbacks 6-2 Sunday afternoon.
Buster Posey, Joaquin Arias and Juan Perez added RBI singles for the Giants, who won the final two games of the three-game series to pull within 1 1/2 games of Arizona in the NL West.
Gaudin, making his second start after beginning the season as San Francisco's long reliever, allowed two runs on five hits in six innings. Gaudin (2-1) struck out seven and walked one.
Diamondbacks starter Tyler Skaggs (1-1) struggled from the outset but managed to go five-plus innings, giving up five runs on eight hits and three walks with four strikeouts.
Skaggs, making his third start of the season and ninth of his career, faced six batters before finally recording his first out of the game.
Andres Torres, Scutaro and Posey started the game with consecutive singles, the last scoring Torres for a 1-0 lead.
Skaggs walked Hunter Pence to load the bases, and Arias, subbing for the injured Pablo Sandoval, singled to center to make it 2-0.
Pence doubled to lead off the third, his third extra-base hit in six at-bats, and scored on Perez's first career hit to extend the Giants' lead to 3-0.
Scutaro added a solo home run off the netting on the inside of the left field foul pole with one out in the fourth for a 4-0 lead.
The Diamondbacks, who had only managed one hit off Gaudin over the first three innings, broke through in the fourth.
Miguel Montero hit a one-out single, went to second on Jason Kubel's two-out single to right and scored on a single by A.J. Pollock.
Kubel then came home on a balk called by third base umpire Greg Gibson when Gaudin failed to come to a complete stop, pulling Arizona to within 4-2.
But Belt answered in the top of the fifth, driving a fastball from Skaggs to right for his seventh home run and first since May 20 and a 5-2 lead.
NOTES: Sandoval, who aggravated his left foot strain on Saturday, was given Sunday off ahead of a scheduled day off Monday. Sandoval has missed four of the Giants' last eight games because of the injury and had an MRI exam performed on the foot earlier Sunday. ... Gaudin was making his second straight start after being used strictly in relief since 2009. ... Skaggs has allowed four home runs in 16 2/3 innings. ... In addition to recording his first career hit, Perez ran full speed into the padded right field wall as he tracked down and caught a long fly ball hit by Paul Goldschmidt in the first inning.