SAN FRANCISCO (AP) Zack Greinke's body has caught up with his delivery and he's pitching better every out, a good sign for a team getting on a roll heading into a long homestand.
Greinke and Madison Bumgarner both pitched well in a showdown of NL West aces, but Welington Castillo hit a two-run homer in the seventh inning to help the Arizona Diamondbacks beat the San Francisco Giants 2-1 on Wednesday night.
''This was definitely the best I've felt all season,'' Greinke said. ''It worked out pretty good.''
Greinke (1-2) got his first win with Arizona and remained undefeated against the Giants - he's 8-0 in 11 starts against San Francisco and 3-0 against Bumgarner. He gave up a run on six hits over 6 2/3 innings, walking one and striking out seven.
''I've been working on getting things right,'' he said. ''Everything is smoother. My body is starting to do things it's supposed to do instead of doing things wrong.''
Brandon Drury added two hits for the Diamondbacks, who won their fourth straight and have taken 11 of their last 13 in San Francisco.
Bumgarner (1-2) went seven innings, giving up the two runs on five hits. He walked one and struck out eight as the Giants lost their fourth straight and seventh of eight.
Castillo hit his second home run of the series and his third of the season, taking Bumgarner deep on an 0-2 pitch. He's driven in four runs during the series and hit .325 (14 for 44) at AT&T Park in his career.
''Both pitchers were spot on,'' Diamondbacks manager Chip Hale said. ''It took one pitch that Bumgarner left in the zone for us to hit. For a while I thought we might be going 20 innings.''
Gregor Blanco hit a one-out triple and Angel Pagan followed with an RBI single in the seventh to end an 18-inning scoreless streak for the Giants against Arizona. Blanco had two hits.
''We got a great pitching effort, we're just missing some timely hits,'' Giants manager Bruce Bochy said. ''We finally got one late in the game but we had a couple chances early.''
Tyler Clippard worked the eighth for his career-best seventh scoreless outing to start a season.
Brad Ziegler earned his fourth save, extending his team record to 32 consecutive. He has also recorded 22 consecutive scoreless outings against the Giants, the most ever against them.
A chance meeting between Kristen Posey and Melissa Wiggins motivated Kristen and her husband, Giants catcher Buster Posey, to help raise funds for pediatric cancer research and awareness. Melissa's son, 4-year-old Cannon Wiggins, has been diagnosed with neuroblastoma, a cancer most common in childhood and infancy. The Poseys are parents of 3-year-old twins and immediately identified with Wiggins. ''I had no idea the lack of funding,'' Kristen Posey said. ''Once I found that out, I did not want to sit back and do nothing. That's easy to do. It's not all smiling children without hair. What they go through is torture, and we want to do something.''
Diamondbacks: INF Paul Goldschmidt has reached base in 21 of his last 22 games against the Giants. ... INF Jake Lamb, who was out of the starting lineup against a left-hander, has reached base safely in 18 of his past 21 games on the road. He delivered a pinch-hit double in the eighth. ... OF Yasmany Tomas singled and scored on Castillo's homer and has reached base safely in eight straight.
Giants: OF Hunter Pence was given a routine day off. Blanco started in his place. Pence popped up with a runner on third as a pinch-hitter in the seventh for Bumgarner, who owns an ERA of 1.58 in 11 home games against the Diamondbacks.
Diamondbacks: RHP Shelby Miller (0-1, 8.53) starts Thursday's series finale. He's 2-1 with a 1.71 ERA in four starts against the Giants.
Giants: RHP Johnny Cueto (3-0, 3.38) will start in Thursday's matinee. He's 6-1 with a 2.54 ERA in eight games against the Diamondbacks. His next win will be No. 100.