SAN FRANCISCO -- Marco Estrada went from feeling funny to feeling good and it worked to his advantage.
Estrada gave the Brewers more than they could expect in his first start in two months. The right-hander allowed a hit, did not walk anybody and struck out six.
"At first I felt a little weird out there," Estrada said. "As I got going I felt more comfortable. Overall, I thought it went pretty well."
Estrada was activated from the disabled list before the game to make the start in place of left-hander Tom Gorzelanny, who is still bothered by a sore elbow. Estrada had only a pair of rehab starts and his pitch count was limited. He retired his last 14 batters and 15 of 16 overall.
"His command was outstanding," Brewers manager Ron Roenicke said. "He kept his curve down in the zone and his fastball had life to it. For him, coming back after two starts and throwing only 2 2/3 innings, I thought it was really good."
Alfredo Figaro (2-3) pitched two innings to earn the victory. Burke Badenhop and Michael Gonzalez each added a scoreless inning.
Jeff Bianchi and Martin Maldonado also drove in runs for the Brewers, who won their third in four games.
The Brewers did lose infielder and leadoff hitter Rickie Weeks to a strained left hamstring. He appeared to injure himself trying to beat out an infield grounder in the eighth.
"I took two or three steps out of the box and I felt a little pop," Weeks said.
Weeks added that he has never had hamstring problems before.
Buster Posey drove in a run for the Giants, who have lost four of five.
"I was working a lot during my bullpens and I was excited to be back out there," Estrada said. "I tried to stay relaxed and not show any emotion."
Davis made a shoestring catch on Posey's fly, saving at least one run and possibly avoiding a rally.
Madison Bumgarner (11-7) took a shutout into the eighth inning, but lost. He gave up four runs -- three earned -- on five hits in seven-plus innings. He walked three and struck out four.
"For whatever reason, we don't look like the same team we were last year," Bumgarner said. "There are things I could have done differently. There are things everyone could have done differently. It's been the same story all year."
The game was scoreless into the bottom of the seventh. Brandon Crawford walked and Brandon Belt singled to open the inning. After a passed ball, Posey hit a sacrifice fly.
The first four Brewers reached base against Bumgarner in eighth. They all scored.
Davis singled and Yuniesky Betancourt doubled to start the rally. Bianchi beat out an infield single to drive in one run and another came home when Bumgarner threw wildly past third on a bunt.
"We didn't do a whole lot against him," Roenicke said. "When you go up against a guy that good and win, it's a great game."
Santiago Casilla took over on the mound and got one out before Aoki's sharp single up the middle scored two.
It's the first time in 10 starts that Bumgarner allowed more than three runs while pitching at least seven innings.
Davis hit a home run and Maldonado singled home a run against Barry Zito in the ninth.
Gorzelanny (elbow contusion) threw a bullpen session and will likely make his next start on Saturday in Seattle. ... The Brewers sent IF Scooter Gennett to Triple-A Nashville to make room for Estrada. ... Giants OF Jeff Francoeur started in center field for the third time in his career. He made 176 starts there in the minors. ... Giants OF Gregor Blanco, .067 (3 for 45) since the All-Star break, will be given a day or two to clear his mind. "This will give him a chance to catch his breath," SF manager Bruce Bochy said.