PITTSBURGH -- On the same day the Pittsburgh Pirates traded their leading home run hitter, they enjoyed their best power game all season. They hope it's not a coincidence.
Brandon Moss hit Pittsburgh's season-high fifth homer of the game leading off the ninth inning and the Pirates won a series against Milwaukee for the first time in nearly two years, rallying to beat the Brewers 8-7 on Wednesday.
The Brewers had won seven consecutive series against the Pirates -- winning 17 games in a row along the way -- before dropping two of three in Pittsburgh. The series started with an 8-5 Pirates victory Monday that ended the longest losing streak by one major league team against another in 39 years.
"They have a really good team, obviously, so it's nice to beat a good team like that," Moss said after the Pirates bounced back from a 2-0 loss Tuesday.
The homers came as the Pirates were sending first baseman Adam LaRoche, their only hitter with double-digit homers, to Boston for two prospects.
"That's ironic -- that's a good word," Moss said. "It feels good to have a game like this. It's kind of the story of our season, to have a game like last night's and come back and have a game like this."
Ryan Doumit homered twice, with the umpires reversing their call on one, and Garrett Jones and Andrew McCutchen also went deep as every Pirates homer was a solo shot. It was Pittsburgh's first five-homer game since July 12, 2008, against St. Louis.
Jones had three extra-base hits and Delwyn Young went 3-for-4 for the Pirates.
Moss then hit a 3-1 pitch by Mitch Stetter (2-1) over the center-field wall for his fifth homer.
"I fell behind and tried to throw some good sliders away and he didn't bite on them," Stetter said. "In that situation, you never give in. I tried to make a fastball down and away and it came back over the plate."
Ryan Braun homered and drove in three runs and McGehee also went deep for Milwaukee, which went 3-4 on a road trip that began in Cincinnati.
The Brewers hoped Jeff Suppan would pitch himself out of a slump against the team he dominates like no other -- he is 13-3 against the Pirates and 6-0 against them with Milwaukee -- but he left trailing 5-2 after giving up four homers in 3 1/3 innings.
"I made a lot of mistakes down the middle," said Suppan, who is winless in seven starts.
Doumit hit a two-run shot in the first inning, his first homer in 33 at-bats since being sidelined 2½ months with a broken wrist. Doumit followed the McCutchen and Jones homers that came a batter apart with a solo drive in the third.
Doumit's long fly ball to right field was initially ruled a double, but the umpires changed the call after a video replay apparently showed the ball rebounding off a spectator above the home run line in right field.
"It was tough to tell," Brewers manager Ken Macha said. "I don't know what the deal is. Does it have to have conclusive evidence, like the NFL rule? I think they should throw replay away. The fans have to stand there and wait five minutes to cheer."
Pirates starter Paul Maholm, who held the Giants to one unearned run in eight innings Friday, gave up the lead during a five-run Brewers fifth that included McGehee's two-run homer and Braun's two-run double.
Braun also hit his 18th homer as the teams combined for seven homers.
The Pirates were thin on the bench because of the LaRoche trade and shortstop Jack Wilson's sore hamstring. ... The Pirates hadn't hit three homers in an inning since July 21, 2008, in the ninth against Houston. ... Milwaukee is 6-2 against Pittsburgh this season. ... Despite winning, the Pirates are 14-26 against the NL Central.