PITTSBURGH -- Paul Maholm said he had "a rough day." It wasn't his pitching he was talking about.
"Unbelievable. He wore two balls off his body -- both of them hit well -- stayed in the game and gave us 7 2/3 good innings," Pirates closer Matt Capps said. "What else can you ask for?"
Ronny Cedeno homered, Delwyn Young added two hits and an RBI and Capps pitched a perfect ninth for his 22nd save for Pittsburgh, which entered this series on a four-game losing streak, having lost 12 of 13 and 17 of 20.
The Brewers (58-62) fell to four games under .500, tying a season low (2-6). Milwaukee is 4-8 in a stretch of 22 games against teams with losing records that was seen as its only path to the postseason.
"[People] keep saying that, but we also are a team under .500, you know?" Brewers manager Ken Macha said.
The Pirates won their first series since taking two of three from Milwaukee from July 20-22 -- having gone 0-6-1 in series since. They swept an opponent for the first time since taking all three from the New York Mets from June 1-4 (one game was rained out).
Maholm (7-7) was attended to by the training staff both times he was struck but stayed in the game.
The left-hander was hit in his throwing triceps by Cameron's line drive leading off the fourth. He was hit on his left shin by Escobar leading off the eighth.
"Just bruises," Maholm said. "Nothing major. It happens."
"I was surprised he stayed in the game both times," Cedeno said. "He showed me he's a warrior. He's trying to get the win. He pitched real good tonight. His sinker was good today, and his slider. He's got great stuff. They hit a lot of groundballs off him; that's the key."
Maholm allowed eight hits and two walks with five strikeouts to win for the first time since July 7, a span of seven starts.
"It has been a while," Maholm said. "Every game I've just been one or two pitches away to where if I execute the pitches, then I'm deeper into the game and, more than likely, I win the game.
"Tonight it was my determination to get back to how I threw last year, just do whatever I had to do to get into the eighth inning and give the team a chance to win, get it to the guys in the bullpen and let them put it away."
Maholm did not retire the side in order in any inning, but Pittsburgh turned four double plays behind him.
Cedeno came to Pittsburgh in a July 29 trade with the Seattle Mariners having hit only 18 career home runs in 388 games. He has four in 18 games with the Pirates after his two-run homer deep down the left-field line off Yovani Gallardo in the second inning.
Young's run-scoring double the next inning made it 3-0.
"Besides that, he pitched very well," Macha said. "Their guy just pitched better."
Gallardo (11-10) allowed only one other hit in six innings, walked three and struck out six to fall to 1-4 in August.
"That 2-0 slider up in the zone (to Cedeno) ... you just can't do that," Gallardo said. "You get the (No. 8 hitter) and make a mistake up in the zone like that with the pitcher next? I just can't make a mistake in that situation."
Ryan Braun drove in Milwaukee's run with a two-out single in the sixth.
The Brewers are 28-42 since May 31. They have lost five of the past six against the Pirates since having a 17-game winning streak against them snapped.
"You take nothing for granted and take no team lightly, but the Pirates, I hate to say it, they played good baseball this series and they got a few breaks here and there and we didn't," Cameron said.
"You can catch anyone [in the standings]. But at the same time, we feel like we, as a unit, are much a better team than what we've shown these last few days."
It was the Pirates' third sweep of the season and the fourth time the Brewers were swept. ... Milwaukee's pitching staff leads the league in homers allowed and gave up six in the series to the Pirates, who came in homerless in their past five games.