MILWAUKEE -- With three of the Milwaukee Brewers' better players out of the starting lineup, it's not too surprising that Arizona Diamondbacks' left-hander Robbie Ray struck out a career-high 11 batters Thursday afternoon.
But it wasn't enough to stop the Brewers, who got home runs from Hernan Perez and Kirk Nieuwenhuis and five strikeouts from Zach Davies in 6-4 victory at Miller Park.
"That's what it takes on a day like this," Brewers manager Craig Counsell said. "You need somebody to step up."
Davies (8-4) got off to a rocky start, allowing a pair of first-inning runs on ground-rule doubles by Phil Gosselin and Yasmany Tomas.
He settled in after that, retiring six in a row and facing just one over the minimum through the sixth inning.
"Giving up two-strike hits and putting the team in a hole in the first inning, that just can't happen," Davies said. "I was making sure I settled down a little bit and focused more.
"Once the first inning is over, you let it go."
The Brewers tied the game in the third, when Scooter Gennett reached on a two-out single and scored when Perez crushed a 458-foot home run to center -- the second-longest home run this season at Miller Park.
"(Ray) was throwing hard," Perez said. "I just tried to not do too much and put a good swing on the ball. When somebody throws hard and you try to do too much, you are going to miss that ball. ... He left it right down the middle and I hit it good."
Ray retired the next seven Milwaukee batters, striking out the side in the fifth, but ran into trouble in the sixth, allowing a one-out single to Perez and a walk to Chris Carter.
He struck out Nieuwenhuis for the third time but Martin Maldonado followed with a base hit to left, scoring Perez, putting the Brewers ahead 3-2 and chasing Ray.
"If I didn't want to come out of the game, I should have gotten those two first guys out.," Ray said. "That's just the way it is. I made a good pitch to Maldonado. He just kind of poked it out there, didn't really get a good bat on it. I made a good pitch, but was behind in the count. I should have gotten ahead of him and got a different result."
Keon Broxton kept the inning going, slapping a full-count slider to left for a bases-clearing double off Enrique Burgos, who got Davies to ground out to end the inning.
All five Milwaukee runs were charged to Ray (5-10), who struck out a career-high 11 but allowed five hits and a pair of walks over 5 2/3 innings of work.
"He had stuff that was good enough to win the game," manager Chip Hale said. "He pitched well enough to win the game. He gave up the lead 3-2, but other than that it was one itch, the home run. He had almost no-hit type stuff today. Impressive, but again, it's about winning."
The first three Arizona batters reached in the seventh, bringing Davies' day to an end. Will Smith struck out pinch hitter Jake Lamb and allowed an RBI single to Michael Bourn but got out of the inning and the Diamondbacks made it a 5-4 game in the eighth, adding a run on Rickie Weeks' RBI single against Tyler Thornburg.
Nieuwenhuis' solo shot in the eighth provided some breathing room for Jeremy Jeffress, who worked a perfect ninth to earn his 24th save of the season and first since July 5.
NOTES: LF Ryan Braun was a late scratch from Milwaukee's starting lineup because of tightness in his right side. Ramon Flores started in place of Braun, who had an 11-game hitting streak snapped Wednesday night. ... Diamondbacks OF David Peralta will rejoin the team Friday in Los Angeles, Hale said. Peralta has been out since June 14 with a sore back. In 41 games this season, he batted .259 with four home runs, seven doubles and 15 RBIs. ... 3B Jake Lamb, limited by a sore left hand, took batting practice for the first time in four days. Hale was optimistic that Lamb would be able to return to the lineup sometime this weekend. ... Counsell held SS Jonathan Villar out of the lineup on Thursday. Villar was pulled after committing two errors and a baserunning mistake in the first two innings of Milwaukee's 8-1 loss Wednesday night.