Updated

Chad Gaudin recorded a second straight quality start since being forced into the Giants' rotation and pitched San Francisco to a 6-2 victory over the Arizona Diamondbacks in the finale of a three-game series between NL West rivals.

Gaudin (2-1) had not started a game since 2009 and made 18 appearances out of the bullpen this season before Ryan Vogelsong's injury changed his role.

The 30-year-old right-hander limited the Cardinals to two runs in six innings last Sunday and did the same against Arizona while allowing just five hits and one walk while striking out seven.

"Gaudin was just pounding strikes in the zone," Arizona head coach Kirk Gibson said.

Marco Scutaro and Brandon Belt each hit solo homers, and Buster Posey went 2- for-5 with an RBI for the Giants, who took the final two games of the set to win their first road series since sweeping the D'backs from April 29-May 1.

Arizona still leads the division but has lost three of its last four games.

Tyler Skaggs (1-1) took the loss after surrendering five runs on eight hits and three walks over five-plus frames.

The Giants roughed up the rookie Skaggs early as they put their first five hitters on base, with Posey and Joaquin Arias each singling in a run.

Giants center fielder Juan Perez, who was making his MLB debut, robbed Paul Goldschmidt of an extra-base hit in the bottom of the first when he tracked down his fly ball on the warning track in right-center and made the catch before running full speed into the wall.

After taking a moment to recollect his thoughts, Perez stayed in the game and knocked in his first career run in the third. Hunter Pence led off the frame with a double after Didi Gregorius was unable to make an over-the-head basket catch in short left, then scored on Perez's infield hit when Goldschmidt couldn't scoop Martin Prado's low throw from behind the third-base bag.

Scutaro turned on a chest-high fastball and hammered it off the second-deck facade down the left-field line in the fourth, and Belt added another blast an inning later, his over the right-field wall.

"It's good to see the bats come to life," Giants manager Bruce Bochy said.

Gaudin's only troublesome inning was the fourth, as he served up an RBI single to A.J. Pollock and forced in Jason Kubel with a two-out balk.

Gregor Blanco tripled and scored on Andres Torres' sacrifice fly in the eighth inning, and Jose Mijares, Jean Machi, Jeremy Affeldt and Sergio Romo combined for three scoreless innings of relief to wrap up San Francisco's ninth win in its last 11 games at Chase Field.

Game Notes

The Giants are 20-11 against the NL West this year and 25-7 when scoring at least four runs ... Giants third baseman Pablo Sandoval sat out due to a strain in his left foot ... San Francisco continues its nine-game road trip when it visits the Pirates for three games starting Tuesday ... Kubel went 2- for-3 against Gaudin, which actually lowered his lifetime average against him to .692 (9-for-13) ... Goldschmidt went 0-for-4 and did not record an RBI, snapping a streak of eight straight games having driven in a run. The stretch matched Luis Gonzalez's franchise record set from June 3-11, 2002 ... The D'backs begin a six-game road trip Monday against Los Angeles.