Neil Walker #20 of the New York Mets fields a ground ball during the second inning (Stacy Revere/Getty Images)

Ryan Braun hit two home runs, starting pitcher Wily Peralta had another and the Milwaukee Brewers used five homers to beat the New York Mets 7-4 on Saturday.

Braun ended an 0-for-15 skid with his long ball in the third inning to put Milwaukee ahead. His second solo homer followed Scooter Gennett's shot in the seventh. Chris Carter added his 17th of the season, and Milwaukee used the power surge to end a six-game losing streak to the Mets.

Peralta (4-7) may have been battling to keep his spot in the rotation and limited New York to three runs in five innings. He allowed homers to Curtis Granderson and Asdrubal Cabrera. Granderson had three hits.

Peralta's two-run blast in the fourth off starter Logan Verrett (3-4) was the first of his career and first by a Brewers starter since Yovani Gallardo hit one in 2013.

Jeremy Jeffress got two outs in the ninth for his 17th save.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.