The Cardinals squandered a one-run lead in the eighth inning and then lost 5-4 in the 10th on Tyler Colvin's RBI single off Octavio Dotel on Friday.
"It's really a discouraging loss because we did enough," St. Louis manager Tony La Russa said. "If we would have added a run once or twice, then we have room for a misplay or something fluky to beat you."
The Cardinals missed a chance to keep pace or perhaps gain ground on the first-place Milwaukee Brewers on a day when the focus in Chicago was mostly off the field. Cubs general manager Jim Hendry was fired about three hours before the game, but the team regrouped in time to win.
"Every loss is tough," Cardinals starter Jaime Garcia said. "You always want to win. You always want to go out there and give us a chance. (The Brewers) are playing really good. They have a really good thing going on for them. But we feel really comfortable about ourselves, too."
St. Louis began the day 6½ games behind the NL Central-leading Brewers, with about six weeks left in the season.
Geovany Soto led off the 10th with a single off Dotel (0-2), advanced to second on Marlon Byrd's sacrifice bunt, and scored on Colvin's hit to center field.
"I was looking for a pitch to hit," Colvin said. "I was a little antsy on the first two (pitches) and was lucky enough to get a better pitch to hit on the last one."
Chicago beat the rival Cardinals for just the third time in 10 games this season, delighting a home crowd of 42,343 — the largest at Wrigley Field since the home opener in 1978.
"It's fun when they sell this place out," Chicago's Darwin Barney said. "It's electric either way. When you've got that many people behind you — there's a number of Cardinals fans out there and we hear them — but it's fun."
Garcia left with a 4-3 lead after he scattered nine hits in 6 1-3 innings. Garcia, who entered the game hitting .085, added an RBI single.
"He had a little trouble the last inning he pitched," La Russa said. "He made some mistakes but overall he gave us a legitimate shot to win."
Wells gave up four hits in seven innings and struck out five. He set down the Cardinals in order in four of his seven innings, but was hurt by homers by Molina and Freese.
Molina's second-inning homer opened the scoring, and Garcia's single up the middle scored Ryan Theriot to make it 3-0. Freese hit a solo shot in the fourth to put the Cardinals ahead 4-1. He has an RBI in seven of his last eight games.
Barney brought the Cubs within 4-2 with his second homer of the season. He added a triple when Lance Berkman overran a blooper into the right-field corner in the seventh and scored when pinch-hitter Blake DeWitt's fly to center was misplayed by John Jay. That ball rolled to the wall for another triple.
"When I went to go catch it, my foot slipped," Berkman said. "I kicked a divot.
"This is a terrible place. This is probably one of the top five worst places to play defense. It's a bad surface, you can't see. It's tough. It's unfortunate that happened on back-to-back plays."
The Cardinals know they can't avoid too many more losses if they hope to catch streaking Milwaukee.
"They're all tough, especially when you feel like you have a great chance to win," Berkman said. "This is the big leagues, the Cubs have a good team despite their record. They have some good talent, some good pitching. So you're going to get beat. But today we kind of beat ourselves a little bit. If you do that, those are the ones that are tough to live with."
NOTES: St. Louis' Allen Craig made his first career start in center field. La Russa wanted to give the slumping Jay a break. Jay replaced Craig in the fifth inning. Edwin Jackson will start for the Cardinals on Saturday against the Cubs' Matt Garza. Jackson will be making his first in Chicago since being dealt by the crosstown White Sox on July 27. He's won both of his career starts against the Cubs. Garza is 1-1 with a 7.80 ERA in three career starts against St. Louis.