Hector Sanchez crushed the go-ahead solo home run in the top of the 14th inning as the San Francisco Giants edged the Milwaukee Brewers, 4-3, in the opener of a three-game set at Miller Park.
Facing Juan Perez (0-1), Sanchez took the first pitch of the inning for a ball, but then got a fastball out over the plate and launched it deep and over the wall in left-center field for just his second major league home run.
Giants closer Santiago Casilla (1-2), who pitched a scoreless 13th, came back out for the 14th and turned away the Brewers to collect the win.
"He's a good hitter from both sides. He was fresh and he was ready," Giants manager Bruce Bochy said of Sanchez. "You hope someone pops one, and Hector's a good pick. It would have been a tough one to lose. We had just the two home runs, but that's something we've been missing."
Buster Posey crushed a three-run homer and Melky Cabrera added three hits and a run scored for the Giants, who took two-of-three from the Oakland A's over the weekend.
Ryan Braun hit a game-tying two-run shot in the eighth, but left the contest in the 10th with tightness in his right groin. Aramis Ramirez knocked in the other run with a double for the Brewers, who have dropped five of their last six games.
"He's had a couple of tough situations," Brewers manager Ron Roenicke said of Perez. "He's made some good pitches and he's struggled some. He's pitched three days in a row but we have to start swinging the bats."
Trailing 3-1 in the eighth, Milwaukee made the Giants pay for some lackluster defense after Norichika Aoki sent a grounder to Brandon Crawford at shortstop with two outs. Crawford, a usually sure-handed fielder, threw wildly to first, pulling Brett Pill off the bag. Braun followed and got a middle-in fastball from Giants starter Madison Bumgarner that he tattooed deep over the wall in left to tie the game at three.
San Francisco squandered a chance to take the lead in the 12th. After retiring the first two hitters, Brewers reliever Manny Parra hit Crawford and Cabrera followed with a base hit to put two men on, but Posey fouled out to keep the game deadlocked.
The Brewers got the potential winning run into scoring position in the home half of the inning when Cory Hart and Aoki worked back-to-back two-out walks, but Nyjer Morgan hit a tapper to short for a force out to end the inning.
Earlier, the Giants jumped on top quickly, plating three runs in their first at-bat. Crawford and Cabrera drew consecutive walks and Posey brought both runners home when he caught up to a letter-high fastball from Milwaukee starter Randy Wolf and deposited it over the wall in left field for a 3-0 advantage.
The Brewers finally erased their goose-egg in the sixth with a two-out rally. After Hart and Aoki grounded out, Braun beat out an infield single and Ramirez followed with a two-base hit down into the right field corner, which allowed a hustling Braun to score from first to cut the deficit to 3-1.
The Giants began a seven-game road trip in which they will also travel to Miami...The Giants have won 14 of their last 21 games against the Brewers...San Francisco improved to 9-4 this season when facing an opposing left-handed starting pitcher...Milwaukee fell to 10-12 at home this season...Bumgarner allowed three runs -- one earned -- on five hits and a walk while fanning a season-high 10 over 7 2/3 innings...Wolf gave up three runs on five hits and three walks while whiffing four in seven frames.