Updated

Pinch-hitter Eric Chavez's go-ahead bases- loaded walk capped a three-run seventh inning as the Arizona Diamondbacks edged the Milwaukee Brewers, 5-4, in the third game of a four-game series at Chase Field.

With one out in the seventh and the Brewers' Kyle Lohse (5-7) pitching with a 4-2 lead, Jason Kubel clubbed a 1-1 slider to right for a home run. After Lohse gave up a single to Cody Ross and walked Miguel Montero, John Axford came in relief.

Axford walked Martin Prado to load the bases and Didi Gregorius smacked an RBI single to right to tie the game. With the bases still loaded, Chavez walked on five pitches to give Arizona the lead for good.

"We never back down. We fight hard. We never give up," Gregorius said.

Will Harris (2-0) was perfect in the top of the seventh to pick up the win, while Brad Ziegler threw a 1-2-3 ninth to notch his third save.

Lohse got the Brewers on the board in the second. With two on and two out, Lohse delivered an RBI single to center.

Lohse pitched effectively, pitching perfectly through the first 4 2/3 innings, but started to falter in the fifth.

After two quick outs, Lohse allowed a solo shot by Montero, tying the game at 1-1.

The Brewers responded with three runs in the sixth. Jean Segura hit a leadoff single and Jonathan Lucroy hammered a two-run shot to left-center field. Following the home run, Carlos Gomez drew a walk and later scored on a passed ball.

Gregorius hammered a 2-0 fastball to right in the home half, as Arizona began to slither its way back.

"You make mistakes and you pay for it," Lohse said. "They're big league hitters. You fall behind and make the wrong pitch, they're going to hit it hard and sometimes it goes out."

Game Notes

Arizona has won six straight against Milwaukee ... The two teams are 55-55 all-time against each other ... Lucroy has 50 RBI as a catcher, which leads the majors at that position ... The Diamondbacks have reached 50 wins before the All-Star break for the first time since 2003 ... Paul Goldschmidt was 0- for-4, ending a nine-game hit streak ... Milwaukee's Wily Peralta, coming off a shutout against the Reds on Tuesday, will start against Arizona's Ian Kennedy in Sunday's series finale.