Updated

Jonathan Lucroy hit a solo homer and added an RBI single while Logan Schafer went 3-for-4 with an RBI and two runs scored to lead the Milwaukee Brewers over the New York Mets, 7-6, in the middle test of a three-game series.

Francisco Rodriguez gave up a solo homer to Marlon Byrd in the ninth, but struck out the side to close out the win and his eighth save of the year.

Norichika Aoki added two hits, scored a run and knocked in another during Milwaukee's 12-hit outburst, which snapped a two-game slide and gave the Brewers just their third win in their last 11 games.

Yovani Gallardo (7-8) picked up a win after failing to make it past the fourth in his previous two outings, as the veteran righty gave up six hits and four runs over six innings of work.

John Buck homered and drove in three runs and Daniel Murphy went 3-for-5 with an RBI and a run scored for the Mets, who couldn't build off Friday's 12-5 victory.

Shaun Marcum (1-10) suffered his 10th loss by allowing his former team to score six times on 11 hits over his five-plus innings on the hill. Marcum played for the Brewers the previous two seasons and allowed them to score in each of the first four frames.

"He left a lot of balls up," Mets manager Terry Collins said of Marcum. "Tonight was a tough night for him pitching back here. It wasn't a normal night for him."

Aoki scored on Lucroy's base hit in the first inning and added an RBI single himself in the second.

Jean Segura, who was voted to his first All-Star Game on Saturday, tacked on a run-scoring sacrifice fly in the second and singled in Gallardo in the fourth after Lucroy had made it 4-0 an inning earlier with his ninth home run of the season.

Buck put the Mets on the board with a leadoff homer in the fifth before Murphy doubled home Omar Quintanilla later in the frame.

Both teams scored runs in the sixth, with Buck driving in a pair with a one- out base hit and Schafer coming around on Murphy's two-base error.

Brewers reliever John Axford loaded the bases with one out in the seventh and limited the damage to Byrd's sacrifice fly. Milwaukee got the run back in the bottom half when Rickie Weeks worked a two-out walk, stole second and scored on Schafer's double.

"Aggressive baserunning worked out well for us," Brewers manager Ron Roenicke said.

Game Notes

Both teams stranded nine runners ... Sunday's rubber match will pit Milwaukee's Wily Peralta against New York's Jeremy Hefner ... Brewers outfielder Carlos Gomez will join Segura at the All-Star Game, while the host Mets are sending third baseman David Wright and pitcher Matt Harvey.