CHICAGO -- Aramis Ramirez thrilled the sellout crowd of 41,909 at Wrigley Field with a two-run walkoff homer with two outs in the ninth inning Friday to power the Cubs to a 6-5 victory over the first-place Brewers.

The line-drive shot prompted a celebration at home plate that looked as if the Cubs had clinched a seven-game series. Leave it to Lou Piniella to try to keep things in perspective.

"Let's just play them one at a time," the Cubs manager said. "It's fun for me watching them play with the intensity they're playing with. They're starting to be a confident bunch that they can come from behind. Right now, everything's going well. Let's just play them one at a time, and not get too excited about it."

It's hard not to be giddy. The Cubs have won a season-high seven in a row, and are back at .500 for the first time since they were 16-16 on May 10.

"I know it's still early," Chicago's Mark DeRosa said, "but it's an exciting win for us."

Trailing 5-3 with one out in the Chicago ninth against Brewers closer Francisco Cordero (0-2), who had 27 saves, Alfonso Soriano and Mike Fontenot each singled. Derrek Lee hit a sacrifice fly, and Ramirez launched the first pitch, a hanging slider, into the left-field bleachers. It's the Cubs' first walkoff homer in more than two years; Lee had the last one on May 12, 2005, against the New York Mets.

"I just tried to hit the ball," said Ramirez, back one week after being on the disabled list with a strained left knee. "This guy [Cordero] is pretty good. I hit it on the line. If you hit a fly ball today, the wind was going to knock it down.

"You don't want to think about going deep in that situation, just make good contact and things happen," he said.

"It was a real clutch hit -- that ball was smoked," Piniella said. "That's what a great player does at times and he got the opportunity and he got it done."

With the win, the Cubs pulled within 6 1/2 games of the Brewers in the Central Division, much to the delight of the crowd, the largest at Wrigley Field this season. And that doesn't include all the fans on the rooftops surrounding the ballpark. This is a big series.

"We don't want the team ahead of us in the division to open up any more ground," Piniella said before the game. "But at the same time, they have a good ballclub."

The Cubs are starting to look like they might have a good one, too.

"Winning definitely solves all the problems," DeRosa said. "We've definitely come together as a team. Today was a perfect example of it. You could see the excitement -- it didn't matter who hit it, as long as somebody hit it."

What's different now compared to the first two months of the season is that the Cubs know they can come from behind. Earlier this year, they were the ones serving up walkoff hits.

"I think everybody now feels comfortable, and everybody knows what they have to do here," Soriano said. "There's a lot of money in this team, and now everybody forgets about the money and they concentrate on just trying to play the game and have fun. I think everybody now is starting to enjoy the game and have fun."

DeRosa agrees.

"We just felt like we were too talented, and guys were scuffling early and making mistakes -- mental mistakes -- and not playing their game," DeRosa said. "Obviously, you see the talent of Alfonso Soriano at the top of the order, and then there's the influx of young talent like Mike Fontenot -- two more hits today. Ted Williams is cringing."

That's because Fontenot is batting .408 in his 21 games, and has an 11-game hitting streak.

The late-inning effort got Cubs starter Rich Hill off the hook. He threw 92 pitches over three innings to match his shortest outing of the year.

"They fouled off 100 pitches," said Hill, who hopes to tweak his game plan next time and mix in more changeups in hopes of getting ground balls.

By gutting out three innings, the Cubs didn't overwork their bullpen, already short-handed without Ryan Dempster. The Brewers batted around in the first and opened a 5-0 lead when Bill Hall hit an RBI single with the bases loaded, Johnny Estrada added a sacrifice fly, and Kevin Mench connected on a three-run homer. That was it as the Cubs bullpen shut the Brewers down.

The Cubs tallied two runs in the fourth on a run-scoring groundout by Cliff Floyd and on a wild pitch. Fontenot hit an RBI single in the seventh, and that set up the dramatic ninth.

"That was unbelievable -- going from pulling my hair out in the third to jumping through the roof in the ninth," Hill said. "That was a lot of fun."

"If you replay it, you see a bunch of guys acting like fools running to home plate," DeRosa said. "It's a huge game for us."

Piniella will probably post calendars in the clubhouse, so the players know there's still a long way to go.

"It's way too early," Piniella said. "Our job is to continue to play good every day and win some baseball games, and stay in our hole. Once in a while, just pick up and pick your head up and see where you're at [in the standings]. That's it for now. Let's continue to play and have some fun and play hard, and like I told these kids, 'If we do those things on a regular basis, good things will happen.'"

Hill knows it's only June 29.

"There is a lot of the season left and the division is not won or lost today," he said. "We have to remember that. But the way we're playing right now is outstanding."