CHICAGO -- The Cubs tried to give Jim Hendry something to be proud of on Friday.
Geovany Soto scored from second on pinch-hitter Tyler Colvin's walkoff single in the 10th inning to lift the Cubs to a 5-4 victory over the Cardinals, hours after learning Hendry had been dismissed as the team's general manager.
"He's responsible for every single person in here," Cubs pitcher Ryan Dempster said. "I'm glad we won today, because I know he'd be happy for us."
With the game tied at 4 in the 10th, Soto singled to right off Octavio Dotel (2-3) and advanced on Marlon Byrd's sacrifice. Colvin, batting for pitcher Sean Marshall (6-5), followed with a single to center to score Soto.
"I was a little antsy on the first two [pitches] and got lucky enough to get a better pitch to hit on the last one," said Colvin, who stayed loose in the clubhouse by hitting off a batting tee.
It was Chicago's 16th win in the last at-bat; the team now is 6-0 in extra-inning games at home.
"What a day," Cubs manager Mike Quade said, an understatement considering the sequence.
The Cubs have had to deal with their share of strange events this season, such as losing two starting pitchers after their first outings in the first week to watching Carlos Zambrano pack his gear and leave Turner Field one week ago, telling teammates he'd retired.
Friday's game was played in front of 42,343, the largest crowd at Wrigley Field since Opening Day 1978, just a few hours after Cubs players met with Hendry, who wanted to say goodbye after 17 seasons in the organization.
"A good man, a good friend, as good a guy as I've worked for in the game," said Quade, who didn't feel the change would bother the players.
"It's a business, and there's a part of that which everybody understands, too," Quade said.
Starter Randy Wells did fine in the first, retiring the side in order. But the Cardinals got down to business in the second. Lance Berkman drew a walk with one out, and one out later, Yadier Molina belted his ninth homer. Theriot then doubled and scored on Jaime Garcia's single to make it 3-0.
Aramis Ramirez hit an RBI single in the Chicago third, but David Freese gave the Cards a 4-1 lead in the fourth with his eighth home run of the season, a solo shot to right-center field.
Darwin Barney led off the Cubs' fifth with his second homer of the year, and with one out in the seventh, he tripled to right and scored on Blake DeWitt's triple to chase Garcia. St. Louis' Lance Berkman misplayed Barney's ball.
"I didn't miss it by much, but that step cost me," Berkman said. "I went to just catch it, but my foot slipped. I took a big divot. After that, that was it.
"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 [the triples] happened on back-to-back plays."
In the eighth, pinch-hitter Carlos Pena drew a walk against Arthur Rhodes and scored on Soto's double off Kyle McClellan to tie the game.
Quade was happy with the way Wells regrouped after the second inning.
"The fact that he weathered [the second] and continued on is the story for me of him," Quade said. "I thought he threw the ball pretty well."
First, Wells had to get focused on the job at hand.
"This was a tough day," Wells said. "Besides my short stint in Toronto, Jim was the only general manager I've ever played for. I like him more as a person than anything.
"To see him choked up -- I'm not going to lie, the team and myself personally got a little choked up, too. To spend that much time with somebody, it's tough to see them go."
The Cubs, who struggled with runners in scoring position, going 4-for-38, in their most recent series against the Astros, had runners at first and second with two outs in the ninth, but Kyle McClellan got Carlos Pena to fly out to right to end the inning.
The ninth started well when Tony Campana reached on an error by Theriot, but he was doubled off first on Starlin Castro's fly ball to center.
"I think it's the first mistake I've seen [Campana] make up here, and I don't think he'll make that again," Quade said. "When you have the privilege of running when you want -- and he does -- and you're so adept at doing it, there's still one piece of the puzzle that if I'm going to give him the freedom to run, he's got to take care of finding the baseball.
"I'm not taking the bat out of [Castro's] hand in that count. Whether [Campana] peeks -- and a lot of basestealers don't like to -- or whether he bounces up and finds his third-base coach to get some help, there was plenty of time for him to recognize it, if he's on top of that."
The Cubs now are 12-5 in August. It was a good ending to a bizarre day.
"We've dealt with [weird events] before, and I'm thrilled to death with the way guys played," Quade said. "Strange."
Carrie Muskat is a reporter for MLB.com. She writes a blog, Muskat Ramblings, and you can follow her on Twitter@CarrieMuskat. This story was not subject to the approval of Major League Baseball or its clubs.