SAN FRANCISCO (AP) — Alex Wood and three relievers combined for a four-hitter for San Francisco, Kris Bryant hit a sacrifice fly and the Giants reached 104 wins for the first time since 1905 by beating the woeful Arizona Diamondbacks 1-0 Wednesday night.

Manager Gabe Kapler’s ballclub joined the 1945-46 Boston Red Sox as the only two teams to follow a losing season with 104 wins. With four games left, the Giants have a chance to break the franchise wins record of 106 set by the 1904 New York Giants.

San Francisco opened a 2 1/2-game lead in the NL West over the second-place Los Angeles Dodgers, who trailed San Diego in a late game. The Giants are seeking their first division title since 2012 and have clinched no worse than a wild-card berth.

Camilo Doval #75 and Buster Posey #28 of the San Francisco Giants celebrate after defeating the Arizona Diamondbacks 1-0 at Oracle Park on September 29, 2021 in San Francisco. (Thearon W. Henderson/Getty Images)

Camilo Doval #75 and Buster Posey #28 of the San Francisco Giants celebrate after defeating the Arizona Diamondbacks 1-0 at Oracle Park on September 29, 2021 in San Francisco. (Thearon W. Henderson/Getty Images)

Arizona dropped to 50-108, is the losingest team in the big leagues and is 0-8 at San Francisco this season. The Diamondbacks are nearing their team record of 111 losses, set in 2004.

Wood was dominant in his third start since coming off the COVID-19 list, allowing three hits in six innings with six strikeouts. He induced a double play to escape a two-on jam in the third, then struck out pitcher Merrill Kelly with two on to end the fifth.

Dominic Leone (4-5) retired three batters, Jarlin García followed and Camilo Doval pitched the ninth for his second save.

Tommy La Stella, who left Tuesday’s game with soreness in his left Achilles tendon, singled leading off the seventh against Noé Ramirez (0-2). Pinch-runner Steven Duggar stole second and was sacrificed to third before Bryant hit a low liner to right. Duggar scored with a headfirst slide that easily beat the one-hop throw from Henry Ramos.

Winless since July 24, Kelly allowed three hits in five innings.

RETURN OF MADBUM

Madison Bumgarner finally get his moment to be celebrated by the San Francisco fans. The big Arizona lefty pitches against his old club on Thursday night with a crowd this time — unlike his first outing back at Oracle Park last September played in front of cardboard cutouts.

“I know for a fact that this town has loved and appreciated him from afar for the past couple years, he’s done some unbelievable things here,” Diamondbacks manager Torey Lovullo said. “I’m a baseball fan, too, I watch these types of thing all the time. They’re feel-good moments. I know this town means a lot to Bum as well.”

Bumgarner signed an $85 million, five-year contract with Arizona in December 2019 after 11 seasons with the Giants. He helped San Francisco win World Series titles in 2010, ’12 and ’14.

TRAINER’S ROOM

Giants: OF Alex Dickerson (left foot) was held out.

UP NEXT

Bumgarner (7-10, 4.58 ERA) heads into Thursday’s start seeking his first win since Aug. 19. He has allowed 15 earned runs in 24 innings during four starts in September. LHP Scott Kazmir (0-1, 4.09 ERA) gets another start for the Giants. The 37-year-old allowed an unearned run in four innings against the Padres on Sept. 22.

© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.