PHILADELPHIA (AP) -- Jonathan Lucroy's bat and some good fortune helped the Milwaukee Brewers avoid their worst month ever.
Lucroy went 5 for 5 with two home runs and four RBIs as the Brewers battered a struggling Cole Hamels to beat the Philadelphia Phillies 8-5 on Friday night, snapping their longest losing streak of the season at six games.
''I'm happy we won, that's the biggest thing,'' Lucroy said.
Yovani Gallardo (4-5) overcame a shaky first inning to stop a four-game skid, the worst of his career. Yuniesky Betancourt added three hits and an RBI for the Brewers, who averted setting a dubious record for the worst month in franchise history.
Milwaukee finished May with a .214 winning percentage (6-22) to tie the Seattle Pilots, who went 6-22 in August 1969 during their lone season before becoming the Milwaukee Brewers in 1970.
''We've had problems this month?'' joked Brewers manager Ron Roenicke. ''Yes, it was a big win.''
It was the third time in club history that a team won just six games in a month.
Gallardo tossed 5 2-3 innings while allowing five runs on six hits with six strikeouts and three walks. Francisco Rodriguez pitched a scoreless ninth for his second save.
''It's been tough but the guys are still battling,'' Gallardo said.
Domonic Brown continued his power surge with a pair of homers and four RBIs for the Phillies. Brown has six home runs in his last five games and finished May with 12 homers. Jimmy Rollins also went deep for Philadelphia, which has lost four of six.
Hamels (1-9) combined some bad luck and bad pitching into another defeat. The left-hander, who signed a $144 million, six-year contract last season, left to a mixture of boos and cheers after giving up seven runs (six earned) on a career-worst 12 hits with three strikeouts and no walks in five-plus innings.
''I would've never figured he would have this much trouble winning a game,'' Phillies manager Charlie Manuel said.
Hamels became the first Phillies pitcher to lose nine games before June since Kid Gleason in 1891.
''No matter what the stats say, you want to try to win (for the team) and that's not happening,'' Hamels said. ''That's kind of the difficult part.''
The Brewers scored four runs on five hits in a third inning that was indicative of Hamels' strange season.
Norichika Aoki led off with a chopper over the mound that just eluded Hamels. Jean Segura reached on an error and Ryan Braun's weakly hit pop fly fell in short right between three charging Phillies to load the bases.
Aramis Ramirez drove in Aoki with a broken-bat single that found a hole on the right side of the infield. Carlos Gomez followed with a sacrifice fly that was the first solidly hit ball of the inning, and the Brewers got another run on Lucroy's solid single to right. Milwaukee went up 6-3 on Betancourt's infield single that deflected off Hamels' glove.
''We got lucky in the third inning,'' Roenicke said. ''It's about time we had some luck. We've been coming up in key situations and hitting bullets to guys.''
Hamels, who has been plagued by shaky defense at times and a lack of run support much of the season, could use some good fortune.
''That's exactly how his season's going,'' Manuel said of the third.
There was nothing fluky, though, about Lucroy's long homer to left that opened the fifth and put Milwaukee up 7-4. That was one of two mistakes Hamels said he made all night.
''I felt really good, had all of my pitches working,'' Hamels said. ''The game of baseball is very funny. I don't have a lot of control over certain aspects of the game.
''All I can do is fight away and try to make the right pitches. You have to keep understanding that you can only control so much.''
Brown hit the second of his two homers, a long shot to right, leading off the sixth to pull Philadelphia to 7-5. But the Phillies didn't get a hit off four Brewers relievers in 3 1-3 scoreless innings.
Philadelphia got off to a good start, taking a 3-0 lead in the first inning - highlighted by Brown's two-run homer to right - to give Hamels his first lead in 62 innings since April 7.
''Early on I was trying to be too perfect,'' Gallardo said. ''I was falling behind, especially against Brown, and he's a hot hitter. I was trying to go down and away and they were over and up.''
Lucroy launched his second homer into the Phillies bullpen in center off right-hander Mike Adams with two outs in the eighth.
NOTES: Struggling Phillies slugger Ryan Howard attempted a rare bunt leading off the eighth against the Brewers' overshifted defense. Howard fouled off the bunt before striking out to finish 0 for 3. ... The Phillies released right-handed reliever Chad Durbin and recalled left-hander Joe Savery from Triple-A Lehigh Valley. ... Philadelphia 76ers center Andrew Bynum was in attendance. ... Phillies right-hander Tyler Cloyd (1-1, 5.74 ERA) is scheduled to face RHP Mike Fiers (1-3, 6.62) on Saturday. ... Combined with the five stolen bases allowed Thursday to Boston leadoff man Jacoby Ellsbury, the Phillies gave up eight straight steals before Gomez was caught in the ninth.