The Giants prevailed Friday night over the San Diego Padres, 3-2, but they did just as much to lose the game as they did to win it.

Madison Bumgarner threw 25 pitches in the first inning. Giants hitters went 0-for-8 with runners in scoring position against Padres starter Edinson Volquez, who began the game with an 11.68 ERA. Bumgarner executed a slug-bunt attempt perfectly in the sixth inning but nearly hit into a triple play. And Andres Torres botched a sacrifice-bunt try in the ninth.

None of that mattered as Angel Pagan drove in Torres with a one-out double in the ninth inning off Luke Gregerson, breaking a 2-2 tie and vanquishing any lingering disappointment from the three-game sweep San Francisco absorbed in Milwaukee.

The climactic ninth typified the Giants' performance. Gregor Blanco led off by attempting one of his self-described "push/slaps," in which he breaks from the batter's box as he tries to punch the ball on the ground by an infielder. Much to his dismay, Blanco popped up.

"I was disappointed," he said.

But his dejection quickly vanished as the ball fell between shortstop Everth Cabrera and left fielder Kyle Blanks for a bloop single. It was Blanco's third hit of the game.

Up came Torres, who bunted directly to Gregerson -- the one man he was trying to avoid. Gregerson forced Blanco at second base. Torres ached for a chance to atone for his poor execution as he listened to first-base coach Roberto Kelly.

"You want to try to get your job done," Torres said. "But I forgot about that. [Kelly] told me to get a good jump and go."

Torres did exactly that, dashing to second base to record his first steal of the season. Impressed by Torres' clean break, Pagan didn't want to spoil his teammate's theft by fouling off a pitch.

"I wasn't going to swing," Pagan said. "I could see him in the corner of my right eye. He got an incredible jump."

It paid off as Pagan lined Gregerson's 2-0 slider to the right-field wall. Torres scored easily, giving Pagan his sixth go-ahead RBI of the season. He ranked second in that category among National Leaguers entering Friday.

"In those situations, you want to be the guy," Pagan said.

Earlier, Bumgarner wasn't just the guy for the Giants. He was The Man. Seeking his fourth consecutive victory, Bumgarner settled for an impressive no-decision. The left-hander struck out 10 batters in six innings, the ninth double-figure strikeout game of his career.

"We had some good swings early but in the middle part of the game, he locked in," Padres manager Bud Black said. "He got it together. We couldn't get anything going. It was good to get on the board early against him."