SAN FRANCISCO -- The best game of Chris Stratton's career got off to a shaky start when the San Francisco pitcher allowed hits to his first two batters and fell behind in the count 3-0 to the third.
A deep breath, a little faith in catcher Nick Hundley and a fastball that was effective all night settled things down.
"It was huge," Stratton said about working out of the early jam. "Hundo did an awesome job back there mixing it up, and once we got past that it really just kind of took off from there."
Arizona remained a game up in the NL West over Colorado when the Rockies lost 10-7 to the Los Angeles Angels.
Stratton and Corbin had nearly identical outings, the difference being Duggar's homer in the second.
Stratton (9-7) permitted five hits, struck out six and allowed only two runners past first base. He walked none and retired 17 of his final 18 batters to win for the first time since June 17.
The right-hander, who leads the Giants in wins despite two stints in the minors, gave up back-to-back singles to open the game but pitched out of it. Stratton also gave up a two-out triple to Jon Jay in the fifth but got Eduardo Escobar to fly out.
It was the Giants' 11th shutout this season.
"The first inning, that was the key inning for (Stratton)," San Francisco manager Bruce Bochy said. "After that he was really good. Really good with his command and all of his pitches. We needed it. Their guy threw well."
Corbin (10-5) was equally sharp after yielding Duggar's home run. The Arizona lefty retired the next 10 batters, then got three consecutive groundouts after allowing a double and a single to start off the sixth.
Corbin had nine strikeouts and one walk in seven innings while absorbing his first loss in six starts against the Giants this season. He gave up four hits.
"Usually our offense is going to get us back in it so I just tried to put up as many zeros as I could," Corbin said. "We had a couple chances early tonight but Stratton was a little bit better."
The Diamondbacks became the fastest team in major league history to reach 25,000 strikeouts as a team, topping the milestone in 3,371 games. The Miami Marlins did it in 3,650 games.
"Really unfortunate night for Patrick," Arizona manager Torey Lovullo said. "He threw the ball extremely well. Just made one mistake. Outside of that, he was outstanding. Unfortunately we couldn't score some runs for him."
Duggar's second home run of the season helped the Giants gain ground on the Diamondbacks. San Francisco pulled within seven games of first place and 7 1/2 of the second wild card.
"If we can keep rallying off some wins, we might surprise some people," Duggar said.
Jon Jay had three hits for Arizona. Paul Goldschmidt walked in the ninth and has reached base safely in 39 consecutive road games, an ongoing club record.
Duggar lined a 3-1 pitch from Corbin to right field, two batters after Brandon Crawford singled. Duggar's only other home run this season also came against Arizona on Aug. 4.
CORBIN'S STREAK ENDS
Corbin had not allowed a home run in 11 consecutive starts before Duggar's drive. That matched the longest streak by a Diamondbacks pitcher, equaling the mark set by Miguel Batista from August 2002 to April 2003.
"I've probably made worse pitches than that that weren't for homers," Corbin said.
Giants catcher Buster Posey underwent successful hip surgery in Vail, Colorado. The six-time All-Star will be sidelined six to eight months.
RHP Clay Buchholz (7-2, 2.25 ERA) opposes San Francisco LHP Madison Bumgarner (5-5, 2.88) in a marquee pitching matchup Tuesday night. Buchholz is 2-0 and has allowed one run over his past two starts covering 16 innings. Bumgarner has yielded three runs or fewer in 12 of his 15 starts.
More AP MLB:�https://apnews.com/tag/MLB and�https://twitter.com/AP-Sports
Law: Reds risk overpaying to finally land Sonny Gray
Beyond the prospects moving between the three teams involved, Cincinnati surrendered extra value that could haunt the team.
Does Sonny Gray trade make Reds better or just more interesting?
Liberating the veteran from his struggles in Yankee Stadium is Cincinnati's latest move to try returning to relevance in the NL Central.
Ranking every current Hall of Famer by tiers
From Ruth, Mantle, Mays & Co. to players we're not sure belong, we sort out how every Hall of Famer rates -- and how this year's crop fits in.
2019 Hall of Fame ballot: Who did our voters pick?
Roy Halladay and Mariano Rivera are both on their way to Cooperstown, according to our voters. Could Edgar Martinez be joining them in his last year on the ballot?
Reds strike deal for Yanks' Sonny Gray after pitcher inks extension
The Yankees have traded starting pitcher Sonny Gray to Cincinnati, the teams announced Monday, finalizing a days-in-the-making deal that ends Gray's topsy-turvy stint with New York.
How social media is negatively impacting Hall of Fame voting
Deciding which stars deserve a spot in Cooperstown should be a joyful exercise, but backlash to voters' selections is sucking the fun out of the debate. Plus, a look at what players can do about the state of free agency.