Milwaukee, WI (SportsNetwork.com) - Nick Ahmed and A.J. Pollock both homered to help the Arizona Diamondbacks to a 7-5 win over the Milwaukee Brewers in a back-and-forth battle at Miller Park.

Ahmed clubbed a two-out homer off Jonathan Broxton into the bullpen in left center to give the D-backs the lead in the eighth.

Pollock added to the margin with a two-run shot in the ninth for Arizona, which stopped its three-game losing streak.

Addison Reed (2-2) earned the win for 1 2/3 innings in relief and Brad Ziegler converted his third save of the season despite giving up a run in the ninth.

"I have to say I actually called that home run," D-backs manager Chip Hale said. "I told Reed to be ready because Nick's going to hit a home run. For once in my life I called one right."

Broxton (1-2) suffered the loss in relief of Brewers starter Jimmy Nelson, who struck out eight batters and allowed four runs over six innings.

Milwaukee has dropped six straight games.

Consecutive two-out doubles from Paul Goldschmidt and David Peralta in the first gave the D-backs an early 1-0 lead.

Carlos Gomez then tied it up four pitches into the home first with a homer to left center of Arizona starter Rubby De La Rosa.

Each team traded a pair of runs in the third as the game remained close. Ender Inciarte led off the inning with a homer to right and Peralta cranked his fifth homer of the season three batters later that pushed Arizona in front 3-1.

Adam Lind, who went 3-for-3 with three RBI, helped the Brewers keep pace with a drive over the wall in left that scored Ryan Braun, who walked in the previous at-bat.

Nelson struck out the side in the fourth, but not until Pollock went down swinging with the bases loaded to end the inning.

Arizona regained the lead in the fifth when Goldschmidt doubled to lead off, moved up to third on a wild pitch by Nelson and hustled home on Yasmany Tomas' slow chopper to third.

Lind kept the seesaw battle going with his slicing two-out double to left that plated Braun once again.

Chris Owings reached third with no outs in the sixth after a single and a stolen base, coupled with an error by catcher Juan Centeno. Nelson worked out of trouble, however, with a flyout of Ahmed prior to pinch-hitter Mark Trumbo lining into a double play.

"He made some mistakes tonight, but he got through that sixth inning," Brewers manager Craig Counsell said of Nelson. "It was a night where he got through it."

Milwaukee then had the bases jammed in the seventh, but Reed entered and got Aramis Ramirez to pop out before Jean Segura went down swinging.

Game Notes

De La Rosa allowed four runs on six hits over five innings ... Tomas had his 11-game hitting streak halted ... This series will be the final three of a six-game road trip for Arizona, as well as a six-game homestand for Milwaukee ... Each team had 11 hits.