PHOENIX (AP) — Paul Goldschmidt hit a three-run home run and the Arizona Diamondbacks held on to beat the San Francisco Giants 4-3 on Friday night to give Zack Greinke his 15th win of the season.

With his 30th home run and 101st RBI, Goldschmidt became the first Arizona player in franchise history to have three seasons with at least 30 homers and 100 RBIs.

Giants v. Diamondbacks

Pablo Sandoval can’t make a bare-handed play on an infield single by AJ Pollock, Aug. 25, 2017 in Phoenix. (Norm Hall/Getty Images)

Greinke (15-6) allowed three runs, two earned, and seven hits in 6 2/3 innings, striking out four with no walks. He threw a season-high 111 pitches. The Diamondbacks’ ace improved to 12-1 at home this season and Arizona pulled 1 1/2 games ahead of Colorado for the NL’s top wild card berth.

Fernando Rodney pitched a perfect ninth for his 31st save in 36 tries.

Brandon Crawford doubled twice, singled and scored twice for San Francisco.

The Diamondbacks sent eight batters to the plate against Ty Blach (8-10) in the third and scored four runs.

© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed