PHOENIX -- Right-hander Yusmeiro Petit struck out a career-high 10 batters and Hunter Pence was a triple short of the cycle and drove in two runs to help the San Francisco Giants beat the Arizona Diamondbacks 8-2 on Sunday.
Petit (2-0) gave up seven hits in six-plus innings for his second victory in two starts this season. He struck out the side in the first two innings and had nine strikeouts by the fourth, surpassing his previous high of eight set when he was with Arizona in 2009.
Pence hit his 17th home run of the season in the fifth inning off D-backs starter Patrick Corbin (13-5), who has lost four of his last five decisions and has given up 13 earned runs over 10 1/3 innings in his last two starts.
Buster Posey had three hits and a two-run double in the ninth inning, when he scored on Pence's single.
Pence also walked and scored in the second inning and doubled and scored in a three-run fourth. He was 7-for-12 in the series while extending his hitting streak to nine games.
Hector Sanchez had two hits and three RBIs, and his two-run double in the fourth inning gave the Giants a 3-1 lead. Petit singled in the final run of the inning, his fourth hit in 70 career at-bats.
Martin Prado, who led the National League with 43 hits and 30 RBIs in August, had two hits and doubled in the D-backs' first run in the first inning.
Adam Eaton had two singles and a walk, and his RBI single in the seventh inning made it 5-2. Reliever Santiago Casilla got NL RBI leader Paul Goldschmidt on a fly ball to deep center field to end the inning with two runners on.
Pablo Sandoval had two hits for San Francisco (61-75), which has won five of its last eight games.
Willie Bloomquist had two hits for Arizona (69-66), which has lost three of its last four and seven of its last 11.
The D-backs are six games behind Cincinnati with 27 games remaining in the race for the second NL wild card berth.
NOTES: San Francisco has won the last four series against the D-backs this season and five straight series at Chase Field. The teams play one more series this season, a four-game set that begins Thursday at AT&T Park. ... The Giants reinstated IF Tony Abreu from the disabled list and recalled him from Triple-A Fresno when rosters expanded Sunday. ... Arizona promoted RHP David Hernandez and LHP Tony Sipp from Triple-A Reno. Hernandez gave up one earned run in 9 2/3 innings at Reno, and Sipp gave up an unearned run in 10 innings. Sipp pitched a scoreless inning Sunday.