Darrell Porter's two-out single in the St. Louis 10th inning decided a game attended by 40,448, the largest crowd at Chicago's Wrigley Field since July 22, 1979.
Willie McGee, extending his hitting streak to 18 games, got an infield hit with two out in the 10th off Lee Smith (1-3), the Cubs' fifth pitcher. Jamie Quirk, hitting for pitcher Bruce Sutter, walked and Porter hit to center on an 0-2 pitch.
Sutter (5-3) got the decision, ending the Cardinals' losing streak at three, and Joaquin Andujar, in his first relief appearance this season, saved it.
Bill Buckner opened the Cubs' 10th with a single off Kevin Hagen. Manager Whitey Herzog called on Andujar, who ended the game on three pitches, forcing Ron Cey to hit into a double play and retiring Keith Moreland on a grounder.
"Whitey asked Dave LaPoint if he could pitch, and I told him I'm going to the bullpen," said Andujar, who has a 3-8 record. "I'm a team man, a professional and I love to play. I threw fast balls down the middle. I don't believe in pitching fancy. Here it is, if you hit it, you hit it. If you don't, I win."