MILWAUKEE (AP) After struggling to score runs in the last four games, Carlos Gomez knew his team needed a spark.
The Milwaukee Brewers outfielder provided one. Immediately.
Gomez hit the first pitch he saw from Mike Bolsinger leading off the bottom of the first inning for his eighth home run of the season to propel the Brewers to an 8-3 win over the Arizona Diamondbacks on Monday night.
''I really wanted to get something going tonight,'' said Gomez, who also had a two-run single and walked three times. ''I knew he likes to throw the ball close to the zone on his first pitch, so I was ready for it.''
Gomez was just 3-for-16 in the Brewers' four-game series against the Cincinnati Reds over the weekend, while Milwaukee lost three of the games. He said he thought about making sure he was swinging at good pitches while coming to Miller Park on Monday.
''I continued that through batting practice and right into the game,'' Gomez said.
Martin Maldonado and Jean Segura also homered for Milwaukee, which had lost four of its last five entering the game. The Brewers still have the best record in baseball at 22-11.
Milwaukee remained the only team in baseball to not lose when scoring at least four runs, improving to 18-0 in those games.
Brewers manager Ron Roenicke said he was pleased to see his team's offense come to life. The Brewers had been struggling offensively, scoring only 10 runs in the Reds' series.
''We've been talking about somewhere in there getting, six, seven, eight runs and we did,'' Roenicke said. ''It sets up a lot of things when you get people on base. The guys did a great job.''
Matt Garza (2-3) allowed three runs and eight hits in six innings for Milwaukee. It was only the third time in seven starts this season that Garza has not given up at least four runs.
Garza said it was satisfying to win the game, despite struggling through the first few innings.
''I really wanted to attack tonight and not shy away from contact,'' he said. ''My teammates really backed me up tonight until I got it together.''
Bolsinger (1-2) took the loss after giving up four runs and seven hits in five innings.
''We didn't execute pitches from the first pitch of the game,'' Diamondbacks manager Kirk Gibson said. ''We walked seven on the night and we needed to make pitches and we couldn't make them. We couldn't keep the ball down.''
Arizona grabbed a 1-0 lead in the first inning when Gerardo Parra led off the game with a single and moved to second on a walk to Miguel Montero. With two outs, Aaron Hill lined a hit to right that Brewers outfielder Caleb Gindl dived for, but could not hang on to as Parra scored.
Gomez tied the score in the bottom of the inning with homer.
The Brewers grabbed a 3-1 lead in the second as Maldonado hit a two-run homer.
Arizona tied it at 3 in the third inning on RBI singles by Montero and Hill, who had four singles in the game. The Diamondbacks loaded the bases with one out, but Garza struck out Alfredo Marte and Ender Inciarte to get out of the inning.
Khris Davis' sacrifice fly in the fifth inning scored Scooter Gennett, who had doubled, to give Milwaukee a 4-3 lead.
Gomez's bloop single in the sixth scored two runs. Segura then followed with a long home run to left field, his second of the season, to boost the lead to 8-3.
The Brewers won a challenge in the fourth when Bolsinger was called safe at first after Segura bobbled his grounder. However, the call was overturned after replays showed he was out.
NOTES: Diamondbacks SS Chris Owings was voted the National League Rookie of the Month for April. Owings paced N.L. rookies in hitting through the first month of the season, posting a .313 average. He also led rookies with five doubles, six extra-base hits and 26 hits in 28 games. ... Arizona OF A.J. Pollack didn't start for the fifth straight game due to a groin injury. He pinch hit in the sixth inning and grounded out. ... RHP Marco Estrada (2-1) will start in the second game of the series for Milwaukee against Josh Collmenter (1-2) for Arizona.