Boston jumped out to a 2-0 lead in the third inning when Alex Verdugo homered off Freddy Peralta.
The Milwaukee offense answered with a run in the bottom half of the inning on an RBI single by Christian Yelich. In the fourth, the Brewers took a 3-2 lead with a two-run inning. Rowdy Tellez blasted his sixth home run of the year, and Brice Turang singled to drive in William Contreras, who scored on an excellent slide into home plate.
Peralta settled in for the next couple of innings and appeared well on his way to six strong innings after the homer. With two outs in the top of the sixth, Enrique Hernandez walked on a borderline ball four call by home plate umpire Alfonso Marquez. Peralta then got ahead of Triston Casas 0-2 but lost him for his second consecutive walk.
Craig Counsell then called on Hoby Milner to extinguish the threat. Boston instead took a 4-3 lead on a soft single to shallow right by Rob Refsnyder and a line drive by Jarren Duran off the glove of Owen Miller at third base.
That closed the book on Peralta, who allowed four earned runs in 5 2⁄3 innings. He struck out four and walked two.
The Red Sox added another two-out run in the seventh inning. Bryse Wilson walked Justin Turner and allowed an RBI double to Masataka Yoshida to make it 5-3.
The Brewers threatened a comeback in the bottom of the eighth when Rowdy Tellez and William Contreras reached with two outs, but Josh Winckowski struck out Brian Anderson to end the inning. Milwaukee went down in order in the ninth against Kenley Jansen to end the game.
The loss snaps a four-game winning streak for the Brewers, who continue their series with the Red Sox tomorrow night.
Wade Miley will be the starting pitcher opposite Garrett Whitlock. Miley was excellent in his last start, striking out eight San Diego Padres in seven shutout innings. First pitch is scheduled for 6:10 p.m.