The Cardinals had lost their last seven games and had seen their lead in the National League Central reduced to 1 1/2 games -- an advantage they maintain.
Pujols took a big step toward his second consecutive Most Valuable Player award by ripping a 1-0 pitch from San Diego side-armer Cla Meredith with two outs in the eighth to erase a 2-1 Padres lead.
The math is that the Cardinals' magic number for eliminating Houston is four and Cincinnati two. Their 81st win ensured a winning season, if they don't have to play a makeup game against San Francisco on Monday.
The revamped Cardinals bullpen gained both its first win and first save since Jason Isringhausen went out with his hip problem on Sept. 6.
Left-hander Tyler Johnson, after wild-pitching home the lead run in the eighth, was credited with his first big-league victory. Right-hander Adam Wainwright gained the save with a scoreless ninth in only the Cardinals' second save chance since Isringhausen went down.
REPLAY: The Cardinals, who had suffered all seven of their consecutive losses from the seventh inning on, almost had an eighth Wednesday night when Tyler Johnson allowed San Diego to score the go-ahead run in the eighth inning on a wild pitch.
But Albert Pujols whacked a three-run homer, the 19th time one of his home runs represented the game-winning RBI, as the Cardinals stopped their slide with a 4-2 win against the Padres.
--If the playoffs began today, the Cardinals would play at San Diego next week in the best-of-five series.
--3B Scott Rolen, whose throwing error set up the Padres' go-ahead run in the eighth inning, also drove in the Cardinals' first run with a single in the fourth. It was just his sixth hit in his last 30 at-bats with men in scoring position.
--1B Albert Pujols, who singled and homered, extended his hitting streak to seven games (10-for-25).
--RHP Anthony Reyes made a bid to be in the postseason rotation with six strong innings Wednesday. He was allowed to throw 108 pitches, a season high, before being lifted in the seventh.
--LHP Tyler Johnson, the winning pitcher, improved to 1-4. He had sustained two of the Cardinals' seven losses in their recent slide.
BY THE NUMBERS: 11 -- Number of consecutive one-run losses the Cardinals have suffered on the road.