The Milwaukee Brewers were overdue for a game like this.

And badly in need, as much as the team with the best record in the majors can be in need of something.

Finally breaking loose after failing to score more than five runs in any of their previous 15 games at Miller Park, the Brewers pulled away Monday night to an 8-3 victory over the Arizona Diamondbacks.

"We've been talking about somewhere in there getting six, seven, eight runs and we did," said Brewers manager Ron Roenicke. "There was a lot of really good offense out there tonight. It sets up a lot of things when you get people on base. The guys did a great job."

It was a welcome offensive outburst after the Brewers struggled to score runs in their previous five games. They never scored more than three runs over that stretch, going 1-4 to finish a 3-4 trip to St. Louis and Cincinnati.

Of course, it helped that they no longer were facing the Shelby Millers and Johnny Cuetos of the world. Arizona, with the worst record (11-24) in the National League, sent right-hander Mike Bolsinger (now 1-2, 6.08) to the mound.

In boosting their record to 22-11, the Brewers nearly equaled their total run output in the four-game series in Cincinnati, where they scored 10 runs in losing three of four.

"It was really nice to be able to go into a couple of innings where you do have a lead," said Roenicke, whose club had played 15 games decided by two runs or fewer. "It feels good to have so many guys that had good offensive days."

The ringleader was leadoff hitter Carlos Gomez, who whacked Bolsinger's first pitch for a home run to center and proceeded to get on base five times, including three walks. Gomez singled in two runs in the sixth when the Brewers finally broke open the game, a rally capped by Jean Segura's two-run home run.

Backup catcher Martin Maldonado, given a start to allow Jonathan Lucroy some rest, socked a two-run homer in the second inning, added a double and walked to start the four-run rally in the sixth.

"That road trip in Cincinnati was kind of tough," said Gomez. "I didn't try to do too much, just hit the ball to the middle of the park. I had a plan today when the game started. I had been swinging at pitches out of the strike zone too much. Tonight, I looked for pitches that I could put a good swing on.

"Baseball is like that. We know we are going to have series when we struggle offensively, and sometimes the pitching. More important is how we come back. We have to come back and play the right baseball."

It also helped that starting pitcher Matt Garza settled down after a rough beginning. Garza allowed five hits, two walks and three runs over the first three innings and it could have been worse.

Garza, who left his previous start in St. Louis after three innings with a bruised thumb, turned the corner in the third by striking out Alfredo Marte and Ender Inciarte with the bases loaded to keep the score knotted at 3-3.