ST. LOUIS -- As Albert Pujols and the Cardinals' offense slumped a bit on the club's recent West Coast road trip, manager Tony La Russa deflected questions about his slugger with a simple assertion: "When we need Albert," the skipper said, "Albert will be there."

On Friday night, the two-time National League Most Valuable Player made his manager look clairvoyant. After struggling through three fairly ugly at-bats, Pujols delivered a walk-off solo homer in the ninth inning off of Jason Bergmann, giving the Cardinals a 3-2 win over the Nationals at Busch Stadium. It was the eighth game-ending homer of Pujols' career, and his first since July 13, 2006.

"Obviously I could have had better at-bats," Pujols said. "I ended up chasing a couple of bad pitches. But at the end of the night, I came through for the ballclub to try to make up."

Pujols' feat was so memorable that it took the attention off the expected man of the hour, John Smoltz. The veteran starter surely pitched well enough to win, but instead took a no-decision. Making his second Cardinals start and first at home, Smoltz lasted six innings, allowing a run on four hits. He struck out six against one walk, and the only run against him came on a sacrifice fly by Pete Orr in the third inning. In two St. Louis starts, Smoltz has a 0.82 ERA, 15 K's and one walk.

Smoltz received a warm ovation from the Busch Stadium crowd as he, catcher Yadier Molina and pitching coach Dave Duncan walked in from the bullpen before the game, and another when he came to the plate for his first plate appearance. And he made it a point to earn those plaudits with his second successive fine outing.

In fact, this one may have been more impressive than his first. Facing a tougher offense in a tougher park for pitchers, Smoltz lasted longer, though he couldn't match Sunday's scoreless performance or its nine strikeouts.

"I will take it, even if it wasn't my best effort," said Smoltz, who wasn't thrilled with his stuff. "I think I'm going to get better. I think I've got opportunities to get better. So I'm pretty pleased."

Still, a sluggish offense left Smoltz without a chance for a win. Or at least, a sluggish offense for seven innings. Carved up by starter John Lannan for seven, the Redbirds began coming back in the eighth.

That's when Khalil Greene tied the game with a solo pinch-homer. Greene, making his first plate appearance in eight days, jumped a Lannan fastball and deposited it over the left-field wall, getting the Cards back in the game.

"I was just trying to hit a fastball, basically," Greene said. "I fell behind, and I wasn't trying to pull the ball, just get on top of something and see what happens."

That set the stage, and in the ninth, Pujols finished the job. He fouled off a high fastball from Bergmann, then took one that was even further out of the hitting zone. When Bergmann threw one in the heart of the zone at 1-1, Pujols crushed it.

"With a tight situation like that and you as the leadoff hitter, what you want to do is start something," Pujols said. "With a walk, hit-by-pitch, whatever, an error. Just getting on base, because anything can happen. Knowing that I have Matt [Holliday] and [Ryan] Ludwick and [Mark DeRosa] right behind me, I know we have a pretty good chance to score a run."

But, of course, it never got to those guys. Pujols did it himself, hitting homer No. 41 and scoring his 100th run of the year. He has reached that milestone in eight of his nine Major League seasons.

St. Louis once again avoided what would have been its first back-to-back losses since July 25-26, and maintained its nine-game lead over the Cubs in the National League Central.

"We were right there," said Nationals outfielder Willie Harris. "We had a chance to win that game, and we're playing against a championship-caliber team. They are veterans. The middle of that lineup, think about that. Those boys, it's going to be tough to beat those guys."

The rally made a winner of reliever Jason Motte, who pitched a shutout eighth inning, working around an Elijah Dukes double. Dennys Reyes also pitched a shutout inning of relief for St. Louis.