The Diamondbacks ended the Braves’ major-league best winning streak at nine games with a 3-1 victory Sunday at Turner Field.

With Braves hitters unable to get to Diamondbacks left-hander Wade Miley, starter Alex Wood had a small margin for error. He made two costly mistakes in the third inning by walking Miley and offering a pitch that first baseman Paul Goldschmidt could drive out of the park.

Goldschmidt’s two-run home run in the third inning, one of his team’s two extra-base hits, put Arizona ahead for good. The Diamondbacks (37-53) won for the second time in their last seven games.

Goldschmidt stands out in a lineup that otherwise lacks much pop. He entered the game tied for third in NL slugging percentage (.544) and had 15 home runs, 32 doubles and 181 total bases.

After walking Miley to begin the third, Wood retired Ender Inciarte and Aaron Hill. He got Goldschmidt down 0-1 in the count before the slugger smashed a ball that hit the foul pole in left field.

Wood (6-7) allowed just two base runners over the next four innings but the Braves (49-39) couldn’t break through against Miley. Chris Johnson’s RBI single was one of just five hits allowed by Miley in 6 2/3 innings.

Miley (4-6) retired nine batters in a row from the last out of the fourth inning to the second out in the seventh. Braves catcher Christian Bethancourt broke the streak with a two-out single in the seventh, and Diamondbacks manager Kirk Gibson brought in reliever Evan Marshall to face pinch hitter Dan Uggla.

Uggla walked to bring up B.J. Upton, who had gone hitless in three at-bats to put his 11-game hitting streak in jeopardy. Marshall struck out Upton to end the threat.

In the eighth inning Andrelton Simmons led off with a single and Justin Upton walked with one out against Arizona reliever Brad Ziegler. Jason Heyward grounded out and Chris Johnson struck out.

It’s the second time this season Miley was more effective against the Braves than most other opponents. He held Atlanta to one earned run over seven innings of Arizona’s 4-3 home victory over the Braves on June 7.

Early in the game it appeared the Braves might easily keep the line moving, as manager Fredi Gonzalez likes to call their small-ball offensive approach. It worked so well for them during their nine-game winning streak but Miley didn’t allow many openings.

In the first inning Braves shortstop Andrelton Simmons reached on a one-out bunt single and went to third on Freddie Freeman’s hit-and-run single. But Justin Upton struck out and Jason Heyward hit into a fielder’s choice to end the inning.

The Braves were back at it in the fourth when Justin Upton led off with a walk and scored on Chris Johnson’s bouncing single up the middle. But Miley got out of the inning with no more damage and shut the Braves down until the bullpen took over.

The Diamondbacks added pinch hitter Nick Evans’ two-run double in the ninth inning. Braves second baseman Tommy La Stella singled off Addison Reed to start the bottom of the inning before Christian Bethancourt struck out and pinch hitter Ryan Doumit hit into a double play.