MILWAUKEE — Jimmy Nelson hit two batters, threw a wild pitch and gave up two home runs.
However, he also struck out eight and didn't walk a batter over six innings in a head-scratching performance for the Milwaukee Brewers' pitcher.
"You can be wild within the zone, too. Your command can still be off," Nelson said. "A lot of times it can be deceiving to just look at straight strikes and balls. I feel like I fell behind too many guys today."
Nelson gave up four runs and seven hits.
"I should be able to go deeper and give us a chance to win," said Nelson, who threw 103 pitches.
Manager Craig Counsell admitted that his young starter made some crucial mistakes.
"Some first-pitch mistakes cost him a little bit but he battled his way through it and got through six," Counsell said.
Ahmed's homer off Jonathan Broxton (1-2) put Arizona ahead 5-4, and Pollock's two-run shot in the ninth extended the lead.
"I had two stupid pitches (in the eighth). One of them I got away with, one of them I didn't," Broxton said.
Counsell said he thought Broxton could have challenged Ahmed with a good fastball.
"It feels like there's a little bit of a lack of put-away for him," Counsell said.
Diamondbacks manager Chip Hale said he had a feeling Ahmed was going to hit a home run when came to bat in that inning.
"Up until that at-bat, he was having a hard time. They were throwing some really tough pitches," Hale said. "I actually called that home run. So for once in my life I called one right. The way he was taking pitches, I just felt good about that at-bat."
The Diamondbacks scored a run in the first on consecutive doubles by Goldschmidt and Peralta. Milwaukee's Carlos Gomez hit a 409-foot leadoff homer in the bottom of the inning to tie the score.
Inciarte homered on Nelson's first pitch of the third inning to give Arizona a one-run lead. With two outs, Peralta hit another first-pitch home run, extending the lead to 3-1.
Adam Lind had a tying two-run homer to pull the Brewers even again in the bottom of the third.
Arizona loaded the bases with two outs in the fourth off Nelson, but failed to score. Nelson hit two batters in the inning but struck out the side.
The Diamondbacks regained the lead in the fifth on Yasmany Tomas' run-scoring ground out. Lind tied the game again in the bottom of the fifth with an RBI double off Arizona starter Rubby De La Rosa.
Milwaukee didn't score in the seventh after loading the bases with one out.
Lind had a single, double, home run and three RBIs in three at bats but was lifted for a pinch hitter with runners on first and third and one out in the seventh and the score tied. Khris Davis, batting for the left-handed hitting Lind, drew a walk to load the bases off lefty reliever Oliver Perez. Counsell said he liked the matchup with the right-handed bat against Perez. "I think we take the shot right there," Counsell said.
Diamondbacks: C Tuffy Gosewisch was placed on the 15-day DL with an injured left ACL. He sustained the injury on a play at first base on Wednesday. "We'll see if surgery is needed," Hale said. "It's terrible. Maybe it's just a slight tear and he'll be able to rehab it." Arizona selected the contract of C Jarrod Saltalamacchia from Triple-A Reno to fill Gosewisch's roster spot. C Oscar Hernandez was transferred to the 60-day DL.
Brewers: SS Jean Segura was reinstated from the 15-day DL. Brandon Kintzler was placed on the 15-day DL with left knee tendinitis. Kintzler originally had been designated for assignment. ... RHP Tyler Wagner will be promoted from Double-A Biloxi and make his major league debut with a start on Sunday.
Diamondbacks: Jeremy Hellickson (2-3, 5.33 ERA) won his last start on Sunday against the Chicago Cubs.
Brewers: Kyle Lohse (3-5, 5.80) lost his last start on Monday at home against San Francisco. Lohse is 4-3 with a 4.46 ERA in 13 career starts against the Diamondbacks.