Hubie Brooks lined a two-run triple to right field in Montreal, breaking up a seventh-inning tie. It gave him 96 RBI.
"I can understand why they want to pitch to me now," he said. "I haven't been hitting the ball well lately. I just wanted to go with the pitch instead of trying to pull it. I knew I hit it pretty good, but you can't take things for granted the way the ball carries in this park."
The loss left the Cardinals' magic number to clinch the NL East title at four.
Tim Raines tied the game for Montreal when he drew a two-out walk off Ken Dayley (4-3) in the seventh, stole second and scored as third baseman Terry Pendleton threw away Vance Law's grounder.
Jeff Lahti came on and walked Andre Dawson intentionally before Brooks tripled.
The Cardinals had gone ahead, 5-4, in their half of the seventh after Ozzie Smith followed Pendleton's double with an RBI single off Gary Lucas (6-2). Smith stole second and third and scored on Brian Harper's fly.
The teams had traded the lead in the sixth inning on a pair of two-run homers.
After Willie McGee reached on an error, Tom Herr lined a pitch from Dan Schatzeder over the left field fence to give the Cardinals a 3-2 lead, their first of the game.
In the bottom of the inning, Montreal took a 4-3 lead on Tim Wallach's two-run homer.