SAN FRANCISCO -- Randall Delgado won a pitchers' duel with All-Star Madison Bumgarner on Sunday afternoon as the Arizona Diamondbacks salvaged one game on their three-day trip to San Francisco by edging the Giants 3-1.
Paul Goldschmidt drove in one run with a first-inning sacrifice fly and former Giant Cody Ross provided the back-breaker with a two-out, two-run single in the eighth as the Diamondbacks snapped a three-game losing streak and retained a half-game lead in the National League West over the Los Angeles Dodgers, who had won earlier in the day.
The Giants, who were seeking their second series sweep of Arizona this season, fell 5 1/2 games behind the Diamondbacks after losing for just the second time in their last seven games.
The defeat also denied Giants manager Bruce Bochy his 1,500th career managerial win. He was attempting to join 20 others in the major leagues who have reached that milestone.
Delgado (2-3), who took a no-hitter into the seventh inning the only previous time he had started against the Giants in 2011, blanked San Francisco for 5 2/3 innings this time on three hits and four walks.
One of the hits nearly denied the 23-year-old right-hander his win in the sixth inning. But a perfectly executed relay from center fielder A.J. Pollack to shortstop Cliff Pennington to catcher Miguel Montero nailed the Giants' Buster Posey at the plate on a double to the fence by Pablo Sandoval.
Pollack's outfield assist was his sixth of the season and the Diamondbacks' 26th, six more than any other team in the NL.
One out later, Delgado was replaced by left-hander Eury De La Rosa, who got Brandon Belt to pop to short on the first pitch with Sandoval at third.
Heath Bell, David Hernandez and Brad Ziegler completed a five-man, five-hitter with one inning apiece. Two errors, including one by Zeigler on Hunter Pence's inning-opener chopper back to the mound, denied the quintet a shutout with an unearned run in the ninth.
Bumgarner (10-6) left for a pinch hitter in the bottom of the seventh, having limited the Diamondbacks to just a first-inning run. He struck out six over seven innings in his 14th quality start in 20 outings this season, allowing five hits and three walks.
The first three Diamondbacks batters all hit the ball hard off Bumgarner to open the game, and it resulted in a run. Goldschmidt delivered the run, his 78th RBI of the season, with a sacrifice fly, a liner to medium-deep left field that plated Martin Prado, who had tripled to the wall in left-center field.
Arizona, which entered the game in a 3-for-30 slump with runners in scoring position and then failed on their first five opportunities Sunday, provided its bullpen with a cushion thanks to Ross' bases-loaded hit in the seventh. It came off the Giants' third reliever of the inning, Jean Machi, who earlier in the day had been recalled from Triple-A.
Ross, a member of the Giants' 2010 World Series champs, had two of Arizona's eight hits.
NOTES: A loss would have ended a 61-day stay in first place for Arizona. ... The Diamondbacks have scored two runs or fewer while Delgado was in the game in six of his seven starts. ... Bumgarner has recorded decisions (six wins, four losses) in each of his last 10 starts. He'd been given an average of 6.3 runs of support in his previous seven outings. ... The Giants are expected to be without LHP Jeremy Affeldt for six weeks after an MRI on his right groin revealed a moderate strain. The reliever was injured in Saturday night's game. He was placed on the 15-day disabled list and replaced on the roster by RHP Machi, who was recalled from Triple-A Fresno. ... RHP Tim Lincecum is scheduled to make his first appearance since his July 13 no-hitter at San Diego when the Giants open a three-day, four-game homestand Monday against the Cincinnati Reds. The series includes a double-header Tuesday in which the teams will be making up a July 4 rainout in Cincinnati. ... The Diamondbacks will get a first-hand look at RHP Matt Garza, the subject of many trade rumors, when then open a seven-game homestand with a four-game series against the Chicago Cubs on Monday night.