SAN FRANCISCO -

The Milwaukee Brewers scored four runs in the eighth inning to turn the game around and defeat the San Francisco Giants 6-1 Wednesday night at AT&T Park.

It was a scoreless game until the bottom of the seventh when Buster Posey hit a sacrifice fly to give the Giants a 1-0 lead.

But in the top of the eighth, the Brewers rallied. Jeff Bianchi tied the game with an infield single that scored Khris Davis.

Logan Schafer's sacrifice bunt turned into another run when Giants pitcher Madison Bumgartner threw the ball away allowing Yuniesky Betancourt to score the go-ahead run.

Then, Norichika Aoki's single brought home Bianchi and Schafer and the Brewers led, 4-1.

In the ninth, Davis hit his third homer of the season and Martin Maldonado drove in another run with a single.

Alfredo Figaro (2-3) got the win in relief for Milwaukee.

Marco Estrada started for the Brewers and pitched five innings allowing just one hit, striking out six.