Updated

Madison Bumgarner tossed seven innings of one-run ball and the San Francisco Giants topped the Milwaukee Brewers, 5-2, in the middle test of a three-game set at AT&T Park.

Bumgarner (5-1) gave up just six hits and one walk while striking out five. Javier Lopez finished off the eighth after Guillermo Mota served up a leadoff home run and Santiago Casilla tossed a scoreless ninth to record his fifth save of the season.

Bumgarner also added an RBI double. Buster Posey finished 2-for-4 with an RBI single, while Hector Sanchez, Conor Gillaspie and Brett Pill had an RBI apiece for the Giants, who snapped a four-game skid.

Ryan Braun cracked a solo homer and Alex Gonzalez added an RBI single for the Brewers, who have dropped three of their last four contests.

Randy Wolf (2-3) was tagged for four runs on nine hits while striking out three and did not walk a batter over six full frames.

With the game tied at one, the Giants took the lead for good in the sixth, plating three runs to jump out to a 4-1 lead. Melky Cabrera started the rally with a bang as he crushed a triple off the wall in left-center field and scored on a single by Posey.

Pill then drove home Posey with a double to deep center and Joaquin Arias followed with a base hit into left to put runners on the corners. After Sanchez grounded out, Gillaspie hit into a fielder' choice, which allowed Pill to score.

The Brewers got a run back when Braun led off the eighth by crushing a sinker that was up from Mota over the wall in left, but San Francisco got it right back in the home half of the eighth.

After Posey whiffed and Nate Schierholtz grounded out, Arias sent one on the ground to third and reached on a throwing error by Aramis Ramirez. The error would prove costly for Milwaukee as Sanchez followed by hammering a sinker from Tim Dillard for a double to deep center field to score Arias.

Earlier, Milwaukee opened the scoring in the second inning when Ramirez began the frame with a double deep to left and scored on a single up the middle by Gonzalez two batters later to give the Brewers the early advantage.

San Francisco answered with the tying run in the fifth. Sanchez started the inning with a double over the head of center fielder Norichika Aoki. After Gillaspie flew out, Bumgarner drove home Sanchez with a double down the left- field line to tie the game at one.

Game Notes

Bumgarner won his fifth straight start and improved to 11-1 over his last 13 outings on the shores of McCovey Cove.....Milwaukee fell to 6-9 on the road this season...Gonzalez left the game in the second inning with an injury to his right knee...Brewers outfielder Carlos Gomez will be placed on the 15-day DL after suffering a strained left hamstring in Friday's game...In celebration of Cinco de Mayo, the Giants wore their Gigantes jerseys. San Francisco has posted a 7-4 record when wearing these jerseys...San Francisco is hitting just .254 at home this season.