(AP) Carlos Gomez homered, Wily Peralta outdueled Matt Cain to end a three-start winless stretch and the Milwaukee Brewers beat the San Francisco Giants 3-1 on Tuesday night.
Gomez hit his 18th homer in the second as the Brewers jumped on Cain (7-7) early. Jonathan Lucroy added a ninth-inning sacrifice fly.
Peralta (8-11) struck out six of nine batters during an early sequence and finished with six Ks in 6 1-3 innings for his first career victory against the Giants.
Cain was handed his first loss since the All-Star break. The right-hander had been 2-0 with a 1.80 ERA in the second half, and pitched well enough to win this one.
Brandon Crawford doubled to start the eighth but the Giants failed to bring him home for what would have been the tying run.
Cain allowed two runs and four hits in seven innings, struck out six and didn't walk a batter for the fifth time this year but it wasn't enough with little help from a stagnant offense.
He has had his toughest moments against Milwaukee, going 3-7 in 11 career starts.
The struggling defending World Series champions are 2 for 22 (.090) with runners in scoring position in the first two games of the series. Pinch-hitter Joaquin Arias drove in a run on a groundout in the seventh as San Francisco avoided being shut out.
Arias' fielding error in the ninth led to Milwaukee scoring an unearned run on Lucroy's sac fly. The Giants had gone four games without an error, but still have 80 for the second-most in the NL behind the Brewers.
The Brewers did just enough to back Peralta. In the fourth, Norichika Aoki doubled leading off the inning and advanced on Jean Segura's groundout. With Aoki well off third, catcher Buster Posey threw to try to get him.
But the throw sailed wildly into shallow left field past third baseman Pablo Sandoval, who wasn't close despite lunging to his left and Aoki scored.
Peralta had lost his previous two starts and was winless in three outings since back-to-back victories July 9 and 14. Peralta singled to start the sixth for his seventh career hit and sixth this year.
He received a no-decision in his only other matchup with San Francisco, a 10-8 Brewers win April 16 at Miller Park.
Jim Henderson pitched the ninth for his 16th save in 19 chances.
Posey, last season's NL MVP and batting champion, was hit by a pitch from Peralta above his left elbow with two out in the sixth, and Posey grimaced in pain as he slowly walked to first.
Giants manager Bruce Bochy is considering trying Hunter Pence in the leadoff spot perhaps as soon as Thursday afternoon's series finale when he expects to rest Marco Scutaro, who went hitless in four at-bats Tuesday and is 0 for 9 overall in the leadoff spot the past two games.
Right-hander Marco Estrada returns to the mound for the Brewers on Wednesday night for his first start since June 3 after spending time on the disabled list with a left hamstring strain.
NOTES: Bochy said CF Angel Pagan is progressing well in Arizona from left hamstring surgery and could return to the Giants as soon as Sept. 1. ... San Francisco assistant GM Bobby Evans said the club is yet to sign LHP Ted Lilly to a minor league deal. He was designated for assignment July 25 by the Dodgers. "Upon reviewing Ted Lilly's medical history we're going to hold off on pursuing a minor league contract right now," Evans said. ... Giants LHP Barry Zito received the Lou Gehrig Memorial Award given annually by the Phi Delta Theta International fraternity to an MLB player. Zito started Strikeouts for Troops nine years ago to help returning veterans and their families with medical and other bills. "It's a huge honor," Zito said. "Lou Gehrig's name obviously is one that brings to mind a special feeling for most people."