MILWAUKEE (AP) -- Pittsburgh manager Lloyd McClendon called it "a wacky game." The Pirates will take any victory they can get these days.
Pittsburgh was leading 2-0 in the third when the game was delayed for about 10 minutes while both managers met with umpires. The Pirates then played the game under protest.
McClendon contended that Milwaukee starter Doug Davis was stopping twice during his delivery.
"My contention is it was an illegal windup," McClendon said.
Brewers manager Ned Yost said Davis wasn't doing anything different than he has previously.
"He wasn't deceiving any runners," Yost said.
Freddy Sanchez had three hits, including his first career homer, drove in two runs and scored twice for the Pirates, who used their biggest comeback of the season to stop a five-game losing streak.
"Some of the guys were hanging their heads after the game," McClendon said. "I said, 'Let me tell you something. We don't care how you get those wins as long as you get them. It may have been an ugly win, but a win is a win.'"
Mesa got the final five outs, but it was eventful. Pinch-hitter Chris Magruder's bases-loaded fly to left was lost in the sun by Jason Bay, and the ball dropped for an RBI single that brought the Brewers to 11-9.
"There was one spot on the field where the sun was a factor," Bay said. "The way we were playing, of course the ball went straight to that spot."
Said McClendon: "Right after he throws it, the sun goes down. There was no more sun."
Pittsburgh trailed 8-2 after Milwaukee scored five runs in the sixth but answered with five in the seventh to pull within a run.
Sanchez walked to open the eighth and moved to third on Lawton's single, chasing Tommy Phelps (0-2). Julio Santana relieved; after Lawton stole second, Bay hit a sacrifice fly to right, with
Sanchez scoring to tie it at 8 and Lawton moving to third.
"We put a great inning together, kept playing, kept plugging," Lawton said. "Before you know it, we had the lead."
Pittsburgh added two more runs in the ninth on Humberto Cota's RBI double and an RBI single by Sanchez.
Davis pitched six innings, allowing four runs and eight hits with four walks and seven strikeouts. Pirates starter Josh Fogg
gave up three runs and three hits with four strikeouts in five innings.
Davis hit an RBI double and Rickie Weeks hit a two-run homer -- his third in three games -- to give the Brewers a 3-2 lead in the third.
Neither team scored again until the sixth, when the Brewers scored five runs off rookie reliever Ian Snell, capped by Moeller's fourth home run of the year, a two-run shot that made it 8-2. Bay ended the inning by robbing Brady Clark of a two-run homer on a drive to left.
"At the time I was thinking, 'Hey, it was a good play but we're in trouble here,'" Bay said. "It ended up being bigger than it seemed at the time."
Sanchez hit a two-run homer and Jose Castillo had a two-run shot in the seventh as Pittsburgh closed within 8-7.
Milwaukee leads the season series 7-4. ... The Pirates overcame a five-run deficit to beat Baltimore 6-5 on June 7. ... Meadows has not allowed a run in his last seven appearances.