PHOENIX (AP)Austin Riley made what he called a minor mechanical adjustment at the plate two weeks ago that has led to major success.

”(Assistant hitting coach Bobby Magallanes) noticed my posture when I was loading, I was turning my shoulders when I was trying to swing and they were facing second base,” Riley said. ”We cleaned that up back to where I am more square to the plate. It’s allowed me stay on more balls. Whether I get fooled a little bit, I am still able to put a decent swing on it.”

His 439-foot, three-run homer in the seventh inning broke open Atlanta’s 6-0 victory over the Arizona Diamondbacks on Wednesday and helped the Braves avoid their first three-game losing streak of the season.

It was Riley’s fifth homer in the last eight games and 13th of the year.

”It’s good to bounce back after the last couple of days and play a game like that,” said Atlanta manager Brian Snitker, whose team lost leads in the first two games of the three-game set. ”That is more indicative of what we are capable of.”

Atlanta right-hander Kyle Wright threw six scoreless innings and catcher William Contreras had three hits – including two of Atlanta’s five doubles. Adam Duvall, Michael Harris II and Guillermo Heredia also doubled for the Braves.

Wright (5-3) received more than three runs of support for the first time this season while giving up three hits and five walks with five strikeouts in his seventh quality start. The Braves had scored 16 runs when he was in the game in his previous nine starts.

”The last couple of outings he has been grinding his butt off,” Riley said of Wright. ”He’s a stud.”

Atlanta recorded its third combined shutout of the season, the second in which Wright has started.

”It was pretty ugly,” Wright said. ”It was bend don’t break, find a way to make some pitches and get out of it. You are always one pitch away. I feel confident I can get a ground ball when I need it or a strikeout when I need it. That’s a big part of it.”

Atlanta’s five doubles – all with an exit velocity of at least 105 mph – came in the first four innings off Madison Bumgarner (2-4), who had won his last eight decisions against the Braves.

”There was a couple times it crossed my mind just to turn around and throw it in the gap and save time, start the inning off with a runner on second, because that’s what we ended up doing anyway,” said Bumgarner, who gave up seven hits and two walks and struck out six in six innings.

Arizona has been shut out five times.

Ketel Marte singled and walked twice while extending his career-long hitting streak to 14 games for the Diamondbacks, who did not have a hit in the last five innings and got only three runners as far as second base.

David Peralta doubled to open the Arizona fourth but got no further, and Wright induced a double play grounder from Christian Walker after two one-out walks in the fifth. Peralta’s double was Arizona’s final hit.

Contreras drove in Dansby Swanson with his first double in the first inning, and Harris II doubled in Duvall in the second for a 2-0 lead.

”Each inning was different,” Bumgarner said. ”Just trying to find a way to talk yourself into being able to put the ball where it’s supposed to go. Sometimes it just happens.”

SLOW START

Defending World Series champion Atlanta is (24-27) is 10 1/2 games behind the the NL East-leading New York Mets (35-17), the furthest it has been out of first place since finishing the 2017 season 25 games behind Washington.

Atlanta was eight games out of first place and five games under .500 last June 16 before rebounding. Atlanta is 7-6 during a stretch in which it will play 29 consecutive games against teams with a losing record.

DOUBLING DOWN

Matt Olson had his doubles streak broken Wednesday after hitting five in the previous three games, but he still leads the major leagues with 23 doubles this season and is on pace for 73.

”It’s real,” Snitker said.

Boston outfielder Earl Webb holds the major-league record, 67, set in 1931. Only six players have hit 60 doubles in a season, the last when Hall of Famers Joe Medwick and Charlie Gehringer did it in 1936. The Braves’ franchise record is 51, by Hall of Famer Hugh Duffy in 1984.

TRAINER’S ROOM

Braves: OF Ronald Acuna Jr. (general soreness) was held out of the starting lineup Wednesday as Atlanta prepares to begin a four-game series at high-altitude, big-outfield Colorado on Thursday. . LHP Tyler Matzek (shoulder inflammation) was eligible to return from the injured list Wednesday but has not begun a throwing program.

Diamondbacks: RHP Humberto Castellanos (strained right elbow) was placed on the injured list Wednesday and LHP Paul Fry was recalled from Triple-A Reno in the corresponding move. Reliever Fry was acquired from Baltimore on May 18. Castellanos started Tuesday gave up five runs in 4 2/3 innings of a no-decision.

UP NEXT

Braves: RHP Ian Anderson (3-3, 4.34 ERA) is scheduled to face Colorado LHP Austin Gomber (2-5, 5.51) on Thursday in the first game of a four-game series at Coors Field.

Diamondbacks: RHP Merrill Kelly (3-3, 3.67) is to oppose Pirates RHP JT Brubaker (0-4, 4.15) in Pittsburgh on Thursday, the first game of Arizona’s season-long 10-game road trip.

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports