CHICAGO (AP) -- John Jay's RBI double in the 10th inning lifted St. Louis over the Chicago Cubs 5-4 on Saturday, bolstering the Cardinals' bid for another playoff appearance.
Carlos Beltran hit a tying solo homer in the ninth for the Cardinals, who began the day with a two-game lead over Los Angeles for the second NL wild-card spot. Milwaukee dropped to 2 1/2 games back.
The defending World Series champion Cardinals have 10 games left in the regular season. They bounced back from an agonizing 11-inning loss at Wrigley Field the previous day.
After Matt Carpenter and Brian Anderson drew two-out walks from Jaye Chapman (0-1), Jay doubled down the right-field line.
Mitchell Boggs (4-1) got the last out of the ninth. Jason Motte struck out the side in the 10th for his 39th save.
Beltran made it 4-all with his 30th homer, a one-out shot off Carlos Marmol that wrapped just inside the right-field foul pole. Marmol had been successful on 19 straight save chances dating to May 2.
All-Star catcher Yadier Molina of the Cardinals left in the ninth with lower back spasms. He exited after trying to get away from a pitch from Marmol that nearly hit him.
St. Louis lost in dramatic fashion on Friday. Fernando Salas gave up a two-out, two-strike, two-run homer to Darwin Barney in the ninth to send the game to extra innings, and the Cubs won 5-4 in 11 on David DeJesus' RBI single.
On manager Mike Matheny's 42nd birthday, St. Louis improved to 10-10 in September after going 18-8 in the final month last season, when the Cardinals squeezed into the playoffs on the final day of the season.
DeJesus' solo homer started a three-run rally in the sixth as Chicago nearly came from behind to knock off the Cardinals for a second straight day.
Travis Wood again failed to win at Wrigley, though he held St. Louis to two earned runs over five innings, striking out seven. He entered the game 0-5 with a 6.08 ERA over his last seven home starts, but finished with a no-decision when the Cubs rallied.
St. Louis stranded 13 batters and missed several chances to take command of the game. James Russell struck out pinch-hitter Shane Robinson with runner on the corners to end the eighth, while Marmol got Tony Cruz to fly out with the go-ahead run on third to end the ninth. Cruz pinch-hit for Molina.
Adam Wainwright escaped with a no-decision, though he remains winless over his last five starts for St. Louis. He allowed four runs and six hits over seven innings. He hasn't lost in his last eight starts at Wrigley Field.
The Cubs need to win four of their last 10 games to avoid the third 100-loss season in franchise history and first since 1966.
NOTES: Cardinals RHP Jake Westbrook (strained right oblique) was shut down just a few pitches into his bullpen session Saturday. He will be re-evaluated Sunday. RHP Lance Lynn will start in Westbrook's place Monday at Houston. ... Cardinals RHP Chris Carpenter felt "good sore" a day after his season debut Friday, according to Matheny. He is scheduled to pitch Wednesday in Houston. ... Barney's errorless streak at second base reached an NL-record 137 games, four short of the major league record set by Detroit's Placido Polanco in 2007.