PHOENIX (AP) _ Martin Prado lined a two-run single in the eighth inning, Wade Miley pitched eight effective innings and the Arizona Diamondbacks ended a three-game losing streak with a 5-3 win over the Milwaukee Brewers on Thursday night.

Miley (6-7) gave up a pair of homers in the first three innings before settling down.

Adam Eaton helped Arizona close to 3-2 with a two-run triple in the fifth inning, Jason Kubel tied it with a sacrifice fly the next inning and Prado capped the comeback with the bases loaded against Jim Henderson (3-3) in the eighth.

Jonathan Lucroy hit a two-run homer and Carlos Gomez had a solo shot for the Brewers.