Updated

Dan Uggla smacked a pair of home runs and had 1, spoiling the major league debut of Wade Miley.

Martin Prado had three hits, including two doubles, and drove in a run. Uggla and Freddie Freeman hit back-to-back homers in the seventh inning off Zach Duke.

Michael Bourn tacked on two hits, scored twice, and made a spectacular catch against the wall for the National League wild card leaders, who have won three straight and five of their last six contests.

Brandon Beachy (6-2) fanned seven batters over six innings and now has a six- game unbeaten streak. He's 3-0 in that stretch and hasn't lost since July 19 at Colorado.

Miley (0-1), a 24-year-old left-hander, gave up seven hits and five runs in four-plus innings. He also recorded his first hit, a single in the fifth inning.

Miguel Montero knocked in the only run for the NL West-leading Diamondbacks, who have lost four in a row. Despite the slide, Arizona remains 2 1/2 games ahead of second-place San Francisco.