Updated

Casey McGehee set a franchise record with his ninth straight hit, going 4 for 4 and leading the Milwaukee Brewers over the Arizona Diamondbacks 8-4 Thursday.

McGehee had a solo homer, a two-run double, an RBI single and another single. His seventh-inning single off reliever D.J. Carrasco broke the team mark set by Ryan Braun in 2008.

McGehee started his 9-for-9 performance Tuesday night with a double in his last at-bat. He tied his career high with four hits Wednesday night, including a home run.

The major league record for consecutive hits is 12, set by Pinky Higgins in 1938 and matched by Walt Dropo in 1952.

McGehee scored three times and helped the Brewers avoid a four-game sweep. Milwaukee scored three times in the first inning, three more in the second and McGehee hit a first-pitch fastball from Rodrigo Lopez (5-11) for his 18th home run in the fifth.

Randy Wolf (9-9) won consecutive games for the first time this season. He allowed four runs on seven hits, walked four and struck out eight in his 25th start.

Working with a six-run cushion, Wolf faced 10 batters in the fourth as the Diamondbacks scored four times, highlighted by Stephen Drew's three-run homer. Wolf stranded the bases loaded to end the threat.

The Brewers took a 3-0 lead in the first on three hits, two walks and a passed ball. McGehee's single drove in the first run.

Milwaukee tacked on three more in the second on a walk, a double by McGehee and a two-run single by Craig Counsell.

Reliever Zach Braddock began the eighth trying to protect an 8-4 lead, but walked three to load the bases with one out. He gave way to closer John Axford, who retired Chris Young on a fly ball and struck out pinch-hitter Kelly Johnson.

Axford also pitched the ninth, holding on for his 17th save in 19 chances. He struck out Justin Upton to start the inning, but then heard plenty of boos when he walked Adam LaRoche, Mark Reynolds and Rusty Ryal. Stephen Drew hit into a double play to end the game.

Lopez allowed seven runs on seven hits over five innings for the Diamondbacks who were trying to sweep Milwaukee for the first time since they came into existence in 1998.

NOTES: Braun returned after missing three games with a left wrist strain and contusion. He went 0 for 5. ... Lopez leads the NL in home runs allowed with 28 while Wolf is second with 24. Lopez is first in the majors in runs allowed with 98 while Wolf is second in the NL with 90. ... Milwaukee slugger Prince Fielder walked and scored three times.