MILWAUKEE -- For the first time in more than a year, the Chicago Cubs finally won a game in Milwaukee.
Ian Stewart hit a solo homer and scored the go-ahead run on an error, helping the Cubs beat the Brewers 8-2 Sunday to avoid a three-game sweep by their division rivals.
The win snapped the Cubs' 10-game losing streak at Miller Park dating to last April.
"They've kind of had our number here," Cubs starter Jeff Samardzija said.
It was the fourth homer of the season for Stewart, who was hitless in his previous four games. Reed Johnson added a pinch-hit home run in the sixth for Chicago.
Samardzija was lifted after throwing 91 pitches in five innings. He gave up only one run on three hits and two walks.
"You've got to give their lineup some kudos," Samardzija said. "They batted and made me throw a lot of pitches and kept fouling balls off. I felt all right. It was just one of those outings, we had to make some pitches and we had to work."
The converted reliever had won two straight coming into Sunday's game.
"He pitched well numbers-wise, but the ball was up, you could tell it wasn't coming out of his hand like it can," Cubs manager Dale Sveum said. "It was time to pinch-hit, time to take a shot."
"Woody was really sharp," Sveum said. "He did a great job."
Brewers starter Marco Estrada went six innings, giving up five hits and two runs, both on solo homers. Estrada didn't allow a baserunner in the first three innings.
Despite the loss, the Brewers were happy to take two of three from the Cubs after losing four straight series.
"We're all upbeat," Estrada said. "Obviously taking two out of three from anybody, it's a boost."
Milwaukee took a 1-0 lead in the fourth, when Braun reached on a walk, went to second on a single by Aramis Ramirez, took third on a sacrifice bunt by Corey Hart and scored on a sacrifice fly by Taylor Green. Ramirez went to third on a wild pitch, but Samardzija struck out Brooks Conrad to end the inning.
Stewart's homer tied the game in the fifth, and the Cubs took the lead on Johnson's homer in the sixth.
"It's always good to be able to affect the game like that," Johnson said. "I knew that (Estrada) was up there pitch count-wise."
Ramirez walked with two outs in the sixth and Hart doubled to put runners on second and third. Green then hit a grounder to shortstop and slid into first to beat the throw for an infield hit while Ramirez scored to tie the game.
But the Cubs regained the lead in the seventh when Stewart doubled, then scored when shortstop Edwin Maysonet threw high to first on a grounder by Darwin Barney. Stewart took third, then was awarded home plate on the error for a 3-2 lead.
Maysonet is getting playing time in the wake of a significant knee injury to starting shortstop Alex Gonzalez and had a grand slam on Saturday. Brewers manager Ron Roenicke didn't seem particularly bothered by the error, saying the Brewers still were in the game at that point.
"We just can't let it get away from us like it did," Roenicke said.
A pair of Cubs errors -- one by Stewart at third and the other by first baseman Bryan LaHair, who failed to catch a pickoff throw -- put Cesar Izturis on third base with one out. But Barney threw out Izturis at the plate on a grounder to second by Norichika Aoki, and Jonathan Lucroy flied out to end the inning.
The Cubs added a pair of runs in the eighth when Campana walked, went to second on a fielder's choice and stole third. Brewers reliever Manny Parra walked LaHair, then unleashed a wild pitch that allowed Campana to score.
Alfonso Soriano doubled to score LaHair, and Soriano took third on another wild pitch, but Stewart grounded out to end the inning.
The Cubs added three runs in the ninth on an RBI double by Barney and RBI singles by Campana and Castro.
Kameron Loe (2-1) took the loss.
Brewers outfielder Carlos Gomez, on the 15-day disabled list with a strained left hamstring, will go on a minor league rehab assignment this week. ... Aoki hit his first career triple in the third. ... LaHair has reached base in 30 straight games, dating back to April 8.