The victory, San Francisco's fourth straight, combined with the Padres' 1-0 loss to the Cubs lowered the Giants' magic number to clinching the NL West title to one.
One win for the Giants in any of the three weekend games against San Diego would clinch them their first NL West title since 2003.
"It's a good feeling. We're in a good position," Posey said. "You can't really take anything for granted. We all know baseball's a crazy game, so we've got to come out and stay focused [Friday]."
The Giants put themselves in such a position by taking care of business on Thursday, as Sandoval gave the team an early lead with a second-inning solo homer into McCovey Cove.
Sandoval's homer held through the first three innings, as Bumgarner continued his spectacular September. The rookie left-hander didn't dominate the D-backs as he did the Cubs in his last outing, but almost every time Arizona mounted a threat, Bumgarner got himself out of it.
In the second inning, Adam LaRoche led off with a double, but Bumgarner promptly struck out the next two batters before inducing an inning-ending groundout. In the third, the top of the D-backs' order knocked out back-to-back one-out singles, but Bumgarner struck out Arizona's Nos. 3 and 4 hitters, Kelly Johnson and Chris Young, with his patented slurve.
"This kid's such a good competitor, great makeup," Giants manager Bruce Bochy said of Bumgarner, who improved to 7-6 and lowered his ERA to 3.00. "His poise out there is beyond his years. He's 21 years old and he's in the middle of this, but the way he's handled it says a lot of his makeup."
The D-backs tied the score in the top of the fourth with a bases-loaded sacrifice fly, but Bumgarner escaped further damage and was able to earn the win thanks to Torres' go-ahead homer off Arizona starter Barry Enright (6-7, 3.91 ERA) in the bottom of the fifth.
Bumgarner tossed only five innings but struck out seven in earning his first career win at AT&T Park in nine tries.
"It's awesome. It's not come easy," Bumgarner said of the victory. "It wasn't pretty, but it worked. It feels good to get it."
The Giants extended their lead in the sixth on a two-run homer by Posey, his 17th of the season and seventh of September. It is the second time this season Posey has hit seven homers in a month -- also accomplishing the feat in July -- and ties him with Jack Clark (June 1977) for the most homers hit by a Giants rookie in a calendar month.
Now, the series that has been circled on the Giants' and Padres' calendars for the past two months has finally arrived. For the Padres, it's win Friday or hinge their postseason hopes to a potential -- but not so likely -- Wild Card berth. For the Giants, it's about putting the pesky Padres -- against whom they are 5-10 this season -- away as soon as possible.
"We've got to go out and go hard," Bochy said. "Yeah, we've put ourselves in a good position. But we've got some games ahead of us. We've got to go out there and play hard every day."
That mind-set is nothing new for the Giants, who have had to play that way for much of the past two months. As recent as Aug. 25, the Giants were 6 1/2 games behind the Padres. A little more than a month later, they're the ones with the champagne on ice.
"In this last month it's really been one game: One game, you go out and give everything you've got for that one game and you worry about tomorrow the next day," Posey said. "We've just got to keep doing that and good things should happen."