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 teams to follow a losing season with 104 victories. With four games left, the Giants have a chance to break the franchise wins record of 106 set by the 1904 New York Giants.

"Our players can and should be proud," Kapler said. "It’s a huge accomplishment. This team has done so many good things. To say that this club has won more games than any other San Francisco Giants team is quite fulfilling."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

San Francisco maintained a two-game lead in the NL West over the second-place Los Angeles Dodgers, who rallied to beat San Diego 11-9. The Giants are seeking their first division title since 2012 and have clinched no worse than a wild-card berth.

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.

"The margins between a win and a loss are very small," Arizona manager Torey Lovullo said. "We had a couple of opportunities, and we couldn’t take advantage of them. They took advantage of the one they had."

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.

"We can win games so many different ways," Wood said. "We pitched really well and the bullpen’s been nails all year. I can’t wait for October. The fun is just beginning."

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.

"That’s more of what you see in the postseason," said Bryant, who won a World Series with the Cubs in 2016. "Usually the teams that win it all do the little things right. We’re just hoping we can keep winning and keep the Dodgers off our tail. It’s crazy to have as many wins as we do and still fighting for a division."

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," 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.