Adam Eaton hit a two-run triple early on and scored the game-winning run on Martin Prado's two-run single in the eighth inning as the Arizona Diamondbacks edged the Milwaukee Brewers, 5-3, in the opener of a four-game series at Chase Field.
Jim Henderson came on in the eighth inning with the score tied, 3-3, and issued three walks to load the bases for Prado, who stepped to the plate with two outs and lined a base hit to center field to bring in Eaton and Paul Goldschmidt.
Brad Ziegler survived a shaky ninth to close out the win after Wade Miley retired 16 of the final 17 batters he faced. Miley (6-7) lasted eight innings was charged with three runs on eight hits while striking out four and not issuing a walk for Arizona, which bounced back after being swept in three games by the Los Angeles Dodgers.
"Everybody knows what happened last night and I was just trying to go as deep as possible," Miley said. "I was fortunate that I started feeling better at the game went along, got into a better rhythm and get through eight."
Henderson (3-3) took the loss behind Yovani Gallardo, who came in unbeaten in eight career starts against Arizona and gave up three runs on four hits and two walks over six innings.
Jonathan Lucroy belted a two-run homer and Carlos Gomez added a solo blast for the Brewers, who squandered a 3-0 lead and had two chances with the go-ahead run at the plate in the ninth.
Ziegler plunked Rickie Weeks to start the frame and gave up a one-out single to pinch-hitter Juan Francisco, but a strikeout by Logan Schafer and a routine fielder's choice groundout by pinch-hitter Martin Maldonado secured Ziegler's second save.
"We had a couple of chances and we didn't get big hits," Brewers manager Ron Roenicke said.
Jean Segura doubled in the first inning and came around when Lucroy cleared the high center-field wall with plenty of room to spare.
Miley hung a 2-1 breaking call to Gomez in the third and watched as the All- Star outfielder crushed it into the left-field seats and jogged around the bases for his 14th home run of the year.
Gallardo found trouble in the fifth when Prado led off with a double and Miguel Montero followed with a single. He retired the next two hitters, but Eaton split Schafer and Gomez with a sinking liner into the left-field gap and legged out a two-run triple for his first hit of the season.
Arizona tied it without a hit in the sixth when Goldschmidt earned a leadoff walk, advanced on a wild pitch and a groundout and scored on Jason Kubel's sacrifice fly.
Before the game, the Brewers placed outfielder Ryan Braun on the bereavement list ... Miley has allowed three earned runs or less in eight straight starts ... Gallardo came in 6-0 with a 1.62 ERA in his career against the D'backs ... Gomez needs two more hits for 100 on the season. If he gets two within the rest of the series, it will be the first time the Brewers have three players (Gomez, Segura and Norichika Aoki) with 100 or more hits before the All-Star break ... Lucroy has 48 RBI as a catcher this season, which leads the majors at that position ... Arizona swept a three-game series in Milwaukee when these teams met in April.