MILWAUKEE -- Anyone who thought the Reds might limp quietly into the All-Star break with early visions of family time and 18 holes thought wrong.

Friday's 6-5 win over Milwaukee at Miller Park won't win any beauty contests, but Cincinnati showed resiliency to stay in a game that could have easily gone the other way.

"We needed that game badly," Reds manager Dusty Baker said. "And we got it."

Despite a well-pitched game by Reds starter Josh Fogg, who gave up only one run on one hit through his first five innings, a 2-1 lead vanished during a four-run Brewers sixth.

Fogg encountered trouble after he hit batter Rickie Weeks with a 1-2 pitch to lead off the inning. J.J. Hardy was also down in a 1-2 count before he walked, and following a Ryan Braun strikeout, Fogg was lifted.

Bill Bray struck out Prince Fielder but surrendered Corey Hart's check-swing RBI double to short right field. The hits were more solid against Gary Majewski, who gave up Russell Branyan's two-run double over Ken Griffey Jr.'s head in right. Mike Cameron added an RBI single for a 5-2 Brewers lead.

It was another good effort from Fogg, who has no wins but a 2.38 ERA over his two starts since coming off the disabled list.

"Bill came in and did a good job," said Fogg, who was charged with three earned runs over 5 1/3 innings, walking two and fanning six. "He got a punchout and a check swing. The ball had eyes and kind of fell in there. You can't fault anybody for that. He made good pitches. We battled back, which was nice."

Reds hitters stepped up in a big way. Some ill-timed gaffes took care of the rest, as the Brewers committed three errors for three unearned runs -- two of them in the pivotal seventh and eighth innings.

Cincinnati began the top of the seventh with three straight hits off Brewers starter Manny Parra, including David Ross' RBI single that scored Joey Votto. Jay Bruce scored as pinch-hitter Andy Phillips beat out a double-play ball that went for a fielder's choice to second base. The game was tied at 5 when center fielder Mike Cameron lost Jerry Hairston Jr.'s drive in the lights; the no-longer-routine fly ball rolled to the wall for a three-base error that scored Phillips.

In the Reds' eighth, Votto led off with a double off Brian Shouse (3-1), and then Bruce reached on third baseman Bill Hall's one-out fielding error. Later, with two outs and the bases full, Salomon Torres' wild pitch in the dirt got away and brought Bruce home with the go-ahead run.

Mike Lincoln (1-2) pitched a scoreless seventh inning for the victory. It had been over four years since Lincoln last had a 'W' next to his name, as he missed most of that time recovering from two Tommy John ligament replacement surgeries.

"He didn't seem too happy about it," Baker said. "We were happier than he was. He just didn't show it."

In the Brewers' eighth, David Weathers gave up a one-out double to Braun, but got Fielder and Hart to ground out. Reds closer Francisco Cordero issued a one-out walk but got a popup and a called strikeout to nab save No. 19.

"A one-run lead here usually doesn't mean too much, because these guys play well here," Baker said.

"We came in and did a good job," Cordero said of the bullpen. "We held the Brewers -- they're a good hitting team. We've got a great hitting team, too, and we came back."

After a rough 0-2 start to a pivotal six-game road trip through first-place Chicago and Milwaukee, the Reds are 2-2 with two games left. On Thursday, it took seven Reds homers to make up for an early deficit.

Friday's win came via a hodge-podge of interesting ways, but no matter. The Reds are desperately trying to keep this season relevant, and are seeking any optimism to take to the second half.

"We're looking forward to doing that again tomorrow," Cordero said. "It's a good feeling right now to have it 2-2. We can finish this 4-2 or 3-3 and go to the All-Star break."