PHOENIX (AP) — Wilmer Flores and David Peralta homered, Merrill Kelly held the San Francisco Giants to one run in 5 2/3 innings, and the Arizona Diamondbacks avoided a four-game series sweep with a 6-1 victory Sunday.
Kelly (9-12) struck out five and allowed six hits in his first win at home since June 2. Madison Bumgarner (8-8) took the loss for the Giants after giving up four runs on six hits in six innings.
The Diamondbacks ended a four-game losing streak, spoiling Bruce Bochy's final game at Chase Field as Giants manager.
Bochy, who is retiring at season's end, was honored before the game with a videoboard and public address announcement. He then walked to home plate, where Diamondbacks manager Torey Lovullo presented him with an all-inclusive, four-night stay at a lodge in Montana.
The Diamondbacks struck early with three first-inning runs. A two-out fielding error in right field by Austin Slater allowed Eduardo Escobar to take third base on a double, and after a walk, Adam Jones tripled when the ball got past Giants center fielder Kevin Pillar to drive in two runs.
Josh Rojas drove in Jones for a 3-0 lead off Bumgarner, who had nine strikeouts.
Flores hit an 0-2 pitch from Bumgarner in the fifth deep into the left field seats for his sixth home run of the season. Flores is 12 for 19 (.632) with four home runs and seven RBIs in his last six games.
The Giants finally got to Kelly in the sixth. Mike Yastrzemski led off with a triple and came home on Scooter Gennett's single.
Kelly walked two more hitters to load the bases with two outs, but Andrew Chafin got Brandon Crawford to bounce out to end the inning.
Peralta's seventh-inning line drive just cleared the right field fence and landed on the pool deck, his 12th of the season.
A FAREWELL TO CHASE
Bochy has spent decades coming to Arizona as a player, coach and manager, and on Sunday managed his final game at Chase Field.
The Giants played for the final time in Phoenix this season.
Bochy said he thought about his final game in Phoenix walking into the ballpark Sunday morning. He managed the National League at the 2011 All-Star Game in Phoenix and after Sunday finished 69-53 at Chase Field as manager of the Giants.
"The last day is usually when it hits me," he said. "I thought about all the games I've had here, big games, over the years. The first year was '98, so that was a good year. We went to the World Series that year (as manager of the San Diego Padres).
"I've seen some great teams here, great battles. Of course when they had (Randy) Johnson and (Curt) Schilling, they were as tough as anybody," Bochy added. "Had some great times here. I'll miss coming here. They've done a great job here putting together a team and how they play."
The Giants called up infielder Abiatal Avelino, who grounded out as a pinch hitter Sunday, before the game from Triple-A Sacramento. Pitcher Travis Bergen was designated for assignment.
The Diamondbacks brought up right-hander Bo Takahashi from Double-A Jackson, with pitcher Stefan Crichton optioned to Triple-A Reno. Takahashi, 22, is the first Diamondbacks player born in Brazil and the sixth overall to reach the major leagues.
Giants: RHP Shaun Anderson was eligible to come off the 10-day injured list Sunday after a blister healed, but Bochy said he's likely to get a rehab start before being activated.
Diamondbacks: IF-OF Ketel Marte was out of the lineup a second straight game. He dealt with back tightness Saturday.
Giants: After an off day Monday, the Giants send RHP Tyler Beede (3-7, 5.77 ERA) to the mound against the Chicago Cubs and Cole Hamels at Wrigley Field to open a key three-game series against another NL postseason contender.
Diamondbacks: RHP Zac Gallen (2-3, 2.58 ERA) makes his third start as a Diamondback and second of his career against the Colorado Rockies, who come to Phoenix for a three-game series.