SAN FRANCISCO (AP) Kevin Pillar had four hits including a homer and drove in five runs, Madison Bumgarner pitched seven strong innings, and the San Francisco Giants beat the Arizona Diamondbacks 10-4 on Sunday.
Buster Posey had three hits including a double for the Giants, who split the four-game series with their NL West rivals.
Bumgarner (5-7) gave up one run on four hits. He struck out nine and walked none.
The 29-year-old left-hander, who is the subject of trade speculation ahead of the July 31 deadline, moved into a tie with Tim Lincecum for second on the team's San Francisco-era strikeout list with 1,704. Juan Marichal (2,281) tops the list.
Pillar put the Giants ahead in the bottom of the second with a two-run homer off Robbie Ray (5-6). His 11th home run came on a sinker Ray left over the middle of the plate.
Pillar lined a two-run single up the middle in the third to make it 4-0, and doubled over the head of left fielder Tim Locastro in the fifth.
He also had an RBI single in the seventh.
Needing a triple to complete the cycle, Pillar flied out to right in the eighth.
Ray gave up four runs in four innings. He is winless in his last four starts.
Nick Ahmed tripled leading off the fifth off Bumgarner and scored on Ildemaro Vargas' sacrifice fly to close Arizona within 4-1.
The Giants broke the game open in the seventh. Mike Yastrzemski's two-run double highlighted a six-run inning in which they sent 11 men to the plate and matched a season high for runs scored in an inning.
Adam Jones and Christian Walker each had RBI singles for Arizona in a three-run eighth.
Diamondbacks ace right-hander Zack Greinke was selected to his sixth All-Star game.
Giants left-handed closer Will Smith was named an All-Star for the first time.
Diamondbacks manager Torey Lovullo was ejected in the fifth inning for arguing a called third strike on Carson Kelly. The ejection was Lovullo's first this season.
Giants: OF Steven Duggar (lower back strain) reported no pain after playing five innings in a rehab game with Triple-A Sacramento on Saturday, manager Bruce Bochy said. He was expected to play seven innings on Sunday, Bochy said.
Diamondbacks: RHP Taylor Clarke (2-3, 6.10 ERA) will pitch Tuesday's series opener against the Dodgers in Los Angeles. He is 1-2 with an 8.61 ERA over his last six starts.
Giants: RHP Jeff Samardzija (4-7, 4.52) will pitch Monday's series opener in San Diego. The 34-year-old has a 2.44 ERA in nine games (eight starts) at Petco Park.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.