MILWAUKEE — Chase Anderson needed a solid start after a dismal performance his last outing. The Milwaukee Brewers' right-hander got it.

Eric Thames and Trent Grisham hit back-to-back homers, Keston Hiura knocked in two runs and Anderson pitched five strong innings as the Milwaukee Brewers beat the Arizona Diamondbacks 4-0 Saturday night.

"Those were exactly his first two words when I said that was it for the night. He said, 'Good bounce-back," Brewers manager Craig Counsell said of Anderson, who picked up the win after allowing a career-high 10 runs in his last start Sunday in Washington. "It was important. The last one was a struggle, and it didn't go well. Tonight was just the opposite. He made pitches. I don't know if it was his best stuff, necessarily, but he just kept making pitches."

Anderson (6-3) had his fourth scoreless start of the season. Of his 87 total pitches, Anderson threw 60 for strikes in front of a capacity crowd of 41,737.

"I was champing at the bit on my off-days because you're always thinking about your last outing, especially when it's not good," Anderson said. "But I tried to flush it as soon as possible. I was really surprised to give up that many runs in such a little amount of time. I hope that never happens again in my career but to come back out here today, not allow any runs and give the team a chance to win is a nice little bounce-back for me and winning the series is great for the team."

With the win, Milwaukee pulled within two games of Chicago in the race for the second NL wild-card spot. Arizona dropped 5 1/2 games back of the Cubs, who lost to the Nationals earlier in the day.

After managing just two hits against Milwaukee on Friday, the Diamondbacks' bats again were quiet on Saturday. Arizona had just four hits, three of which came against Anderson.

"It seems like the guys are trying to do too much," Diamondbacks manager Torey Lovullo said. "They have that forcing mentality and in sports that's not very good. It doesn't lead to good things. I see it. Each guy is trying to be the guy to step up and do something special and get that line moving in the right direction. We have to break it down and keep it as simple as possible."

Thames put the Brewers on the board in the fourth with a solo home run to right field off right-hander Zac Gallen. It was Thames' 19th homer of the season.

Grisham followed with a solo shot of his own two pitches later. It was Grisham's fourth of the year and marked the fifth time this season that Milwaukee hit back-to-back homers.

Gallen (2-4) struck out eight, but failed to get enough run support and dropped the second of his last three decisions.

"There were a couple of long at-bats, and the next thing you know you are running your pitch count up and you're getting up near 100 (pitches) in five innings," Gallen said.

The right-hander finished the night with 104 pitches in five innings of work for Arizona, which was shut out for the sixth time this season.

After striking out in his previous three plate appearances, Hiura brought home two more runs for the Brewers in the seventh with a bases-loaded line drive to centre field. The single scored Christian Yelich and Mike Moustakas. Yelich reached base after being plunked by reliever Andrew Chafin. Yelich added a double, his 26th of the season.

Christian Walker led the Diamondbacks with two base hits. Jerrod Dyson and Ketel Marte each added a double.

"All we can do is stay focused," said Marte, through team translator Martin Bater. "Maybe, collectively, we have been pressing. But me, personally, no. This is a game of highs and lows and all we can do try to get through the lows to get to those highs."

WALK IT LIKE HE TALKS IT

Brewers outfielder Lorenzo Cain drew a season-high three walks on the night. He also added a base hit and stolen base, his 16th of the season.

ROSTER MOVES

Diamondbacks: OF David Peralta was placed on the 10-day IL with right AC joint inflammation and was sent back to Phoenix, where he was scheduled to have a scan on the shoulder. Peralta was removed from Friday night's game after wincing in pain after a swing. "There is some right shoulder irritation in that same area that had been bothering him," Lovullo said. ... Tim Locastro was recalled from Triple-A Reno to fill Peralta's roster spot. "Tim is an instant ball of energy and a lot of teams need players that play with that type of energy," Lovullo said. "In situations like this, when at times we can be a little bit down, he's always a welcomed sight when he walks into the clubhouse."

Brewers: Opening day starter Jhoulys Chacín (3-10, 5.79 ERA) was designated for assignment. The 31-year-old RHP had been on the IL since late July due to a strained lat and was not expected to return to the active roster until mid-September. "We talked to Jhoulys, we talked to his agent and evaluated where he was from a physical standpoint," Brewers GM David Stearns said. "Some of the guys we're very likely going to have in September and some of the roster space from the 40-man perspective that we were going to need to create over the next couple of weeks. All involved, we thought this was the right time to make this move."... The Brewers called up utilityman Cory Spangenberg from Triple-A San Antonio. ... OF Ben Gamel was optioned to Triple-A San Antonio. Stearns and manager Counsell say Gamel will be back with the club in 10 days.

UP NEXT

LHP Robbie Ray (10-7, 3.99 ERA) will start Sunday afternoon for the Diamondbacks, while RHP Zach Davies (8-6, 3.74 ERA) will take the mound for the Brewers in the finale of the three-game series. Ray has been on the 10-day IL with lower back spasms. Ray threw a bullpen session on Friday. Davies had losses in each of his last four starts. His last win was on July 18, in Arizona. He allowed one earned run on five hits and walked three in seven innings.

___

Follow Keith Jenkins on Twitter: https://twitter.com/MrKeithJenkins

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports