CHICAGO (AP) — Freddy Peralta pitched five sharp innings, Travis Shaw hit a three-run homer and the Milwaukee Brewers beat the Chicago Cubs 4-0 on Tuesday night to stop a three-game slide.

Peralta (1-0) struck out eight and walked four. Kris Bryant doubled in the fourth for Chicago’s only hit of the game.

Shaw connected in the first against Adbert Alzolay (0-1), sending an opposite-field drive deep to left-center. Daniel Vogelbach walked with one out and Christian Yelich singled ahead of Shaw’s first homer of the season.

Omar Narvaez added a solo drive in the fourth. He also went deep during the Brewers’ 5-3 loss to the Cubs on Monday night.

Both benches emptied when Brewers reliever Brad Boxberger hit Willson Contreras with a pitch to lead off the Cubs’ half of the ninth. Contreras, who was beaned in the helmet on Monday, started yelling and walking toward the mound, but was steered to first base by teammates.

The teams milled around briefly on the left side of the diamond, but quickly returned to their dugouts.

Boxberger, who was just activated on Tuesday, then got Anthony Rizzo to ground into a double play. Bryant bounced to third to end the game.

After Peralta departed, Brent Suter worked three innings of near-perfect relief, allowing only a walk to pinch hitter Matt Duffy in the eighth.

Chicago had its best scoring chance in the fourth, when Bryant doubled and advanced to third on Yelich’s error. But Peralta struck out Joc Pederson and Javier Báez, ending the inning.

Alzolay (0-1) allowed four runs and four hits in five innings. Chicago had won three in a row.