Aramis Ramirez ripped a go-ahead two- run single in the top of the seventh inning and the Milwaukee Brewers topped the San Francisco Giants, 6-4, in the opener of a three-game weekend series at AT&T Park.
Jonathan Lucroy clubbed a two-run single and Travis Ishikawa added an RBI on a sacrifice bunt for the Brewers, who snapped a brief two-game skid.
Kameron Loe (2-0) got the final two outs in the sixth inning in relief of starter Zack Greinke to earn the win, and John Axford tossed a 1-2-3 ninth to nail down his sixth save of the season.
Melky Cabrera ripped an RBI triple, while Buster Posey and Joaquin Arias added RBIs for the Giants, who have dropped four in a row.
Clay Hensley (1-3) was saddled with the loss after giving up Ramirez's hit in the seventh.
With the game tied at four in the seventh, the Brewers took the lead for good when Norichika Aoki reached base with a one-out infield hit and Rickie Weeks followed with another infield single. Giants manager Bruce Bochy brought Sergio Romo in from the bullpen to face Corey Hart.
Hart flew out, but both runners moved up a base then scored when Ramirez got a sinker up from Romo and laced it into left field.
"He had a pretty good arm out there he had to face and he put a good swing on it and hit the ball hard somewhere," Lucroy said about Ramirez.
Earlier, Milwaukee struck for three runs in its first at-bat. Carlos Gomez was hit by a pitch to start the game and Weeks walked. After Hart grounded into a fielder's choice, Ramirez walked to load the bases. Gomez then scored on a wild pitch by Giants starter Tim Lincecum, and after Gonzalez fanned, Lucroy picked up his teammate with a two-run single to push the Brewers lead to 3-0.
"I'm happy with the way I was able to come out of it. But giving up three at the beginning of the game in the first inning, that's not the way to put your team in a position to win," said Lincecum.
San Francisco got a run back in the fifth when Angel Pagan ripped a single to open the frame and Brandon Belt followed with a base hit to put runners on the corners. Arias then knocked home Pagan with a single to left.
The Brewers tacked on another run in the sixth to make it a 4-1 game when Lucroy blasted a triple deep to center field and scored on a perfectly-placed sacrifice bunt by Travis Ishikawa.
The Giants fought back with three runs in the bottom half of the inning to tie the game at four. Conor Gillaspie ripped a base hit to left and Cabrera followed with an RBI triple to right for the first run of the inning. Posey then smacked a single into right field to score Cabrera, and Belt reached on an error later in the frame to bring home Posey.
Pagan finished 2-for-4 and has hit safely in a career-high 18 games...Milwaukee finished 2-for-7 with runners in scoring position and stranded five, while the Giants were 3-for-10 with men in scoring position and left six on base,..Greinke gave up four runs on seven hits and one walk over 5 1/3 innings, while Lincecum was tagged for three runs on two hits and four walks over five full frames.