SAN FRANCISCO -- Giants pitcher Madison Bumgarner is a dead pull hitter, but he altered his approach in the third inning, nearly putting a pitch from A's starter Brett Anderson into the arcade before driving one 372 feet into Triples Alley.

That's an out at Oracle Park, of course. In eight MLB ballparks, it would have cleared the wall, but Bumgarner has come to know the pluses and minuses of his home park. He said he doesn't much care about it one way or the other, but his teammate, Will Smith, will certainly go to bed Tuesday night thanking the heavens for the way a ball traveled on a windy night.

Smith came about four inches away from giving up a game-tying two-run double to Matt Chapman in the ninth. Instead it drifted foul, and after three more tense at-bats, Smith blew a fastball past Chad Pinder, clinching a 3-2 win over the A's.

Smith is supremely talented and certainly has repeatedly shown an ability to dig deep. On this night he needed 37 pitches to close it out. But sometimes it also helps to get a little luck.

"Go foul, please," Smith said when asked what he thought as Chapman's drive went out to left. "I was walking with it. I was walking down the line to see if it would go foul. Thank God that it did."

Yes, this was a Torture Night at Oracle Park. It was loud and it was tense and it was fun, and when it was over the Giants were back to 60-60, still 3 1/2 games out in the NL wild-card race. They remain that close in large part because of Bumgarner, who has been part of a handshake line after nine of his last 10 starts.

The Giants are following the big man's lead, and right now he's throwing as well as anyone. Bumgarner has allowed just three hits over 14 innings in his last two starts, with 12 strikeouts to one run and one walk.

The A's seemed baffled by Bumgarner's pitch mix and squared just one ball up -- a homer to left by Stephen Piscotty in the fifth. The only other hit was a pop-up that Aramis Garcia couldn't find in the wind. Bumgarner wiped that leadoff single away with a double play, then retired 12 straight.

At one point he struck out seven of nine hitters, three of them going down looking, and he finished the night with a season-high 25 called strikes. Bumgarner also got three A's hitters to pop out meekly.

"He was in control the whole way," manager Bruce Bochy said. "He commanded the strike zone so well tonight. He had everything going."

Brett Anderson was pretty good on the other side, but the Giants got to him with three straight doubles in the sixth. In the seventh, Bumgarner's bunt helped set the table for another run.

That was Bumgarner's last act of the night, but the game was far from over. The A's, trailing by a pair, opened the ninth with two singles and a strikeout ahead of Chapman. His near-double got heart rates going throughout the ballpark.

"We had to put some torture in that game," Bochy said, smiling.

[RELATED: Watch Joey Bart crush first Double-A homer]

But that old friend usually comes with a positive for the Giants. They tend to win the tortuous ones, and Smith dug deep. He refused to give in to Mark Canha -- who loves destroying the Giants -- with the bases loaded. After a walk brought one run home, Smith ended the night. Because of the heavy workload, he'll get a chance to sit back and watch when the two teams square off again Wednesday.

"I think he did a pretty good job working himself into a day off tomorrow," Bochy joked.