HOUSTON -- The Astros had wowed the St. Louis Cardinals with pitching in the first two games of the series, riding a brilliant two-hit shutout in the series opener by J.A. Happ and getting seven scoreless innings from Wandy Rodriguez one night later.

Nelson Figueroa was anything but dominant in Wednesday's series finale, giving up a two-run homer in the first inning and pitching out of a pair of bases-loaded jams. But thanks, in part, to a three-run homer by Hunter Pence in the fifth inning, the Astros found another way to finish off the sweep.

Pence's homer, his 21st of the season, capped a four-run fifth inning and sent the surging Astros to their ninth win in their last 11 games by a score of 5-2 over the Cardinals, who were swept by Houston for the second time this year and have lost 13 of their past 17 games.

"We're in a good place right now," Astros shortstop Geoff Blum said. "We came off the road playing good ball and faced a Cardinals team that hasn't been playing extremely well against sub-.500 teams and we know that. Their backs are against the wall, not ours. And it didn't look like they wanted to come out and beat us at all."

The Astros, who also swept the Cardinals May 11-13 in St. Louis, went 10-5 against their National League Central division rivals this year. Houston hadn't won 10 games in a single season against St. Louis since 2004. The Cardinals began the day seven games behind the first-place Reds.

"We have to start winning and win a lot," Cardinals left fielder Matt Holliday said. "It can be done."

Although not dominating, Figueroa (4-2) got the win after allowing six hits and two runs in five innings for his first victory this year as a starter. Astros starters have posted a 2.21 ERA in their past 23 games, and Houston has held the opposition to two or fewer runs in 10 of its past 11 games.

"Figgy goes out and battles and works himself out of jams better than anyone I've seen," Pence said. "It's great having him come out and give you a chance to win. If you get a starter that can give you five or six innings and gives up two runs every time, we'll take that."

Perhaps the biggest key for the Astros in this three-game set was the staff's ability to shut down Albert Pujols, who went 0-for-10 in the series after coming in with hits in 16 of his previous 18 games against the Astros.

"Every team has that one guy you don't want to have hurt you," Figueroa said. "They have a tremendous guy behind him in Holliday, but you're going to take your chances with Holliday rather than Pujols, because he's so dangerous. It was a great job by the whole staff to keep him hitless in the series."

Holliday broke the Astros' 20-inning scoreless streak with a two-run homer in the first inning, and Figueroa wriggled his way out of bases-loaded situations in the third and fifth inning to keep the deficit at two runs.

The Astros' rally in the fifth against Jeff Suppan (1-7) began when Brett Wallace drew a walk and went to third on a double by Jason Castro (2-for-4) to put runners at second and third. Wallace was erased at home plate on a fielder's choice by Brian Bogusevic, but Castro scored on Michael Bourn's sacrifice fly to make it 2-1.

After Jeff Keppinger, who was activated from the disabled list before the game, drew a walk, Pence hit a 1-1 pitch high into the air and watched it sail over the left-field wall for a three-run homer that put the Astros ahead, 4-2. The Astros took a 5-2 lead in the seventh when Bourn scored from third on a shallow sacrifice fly off the bat of Carlos Lee.

"Sometimes we have to play small ball and sometimes we get a big hit, but that means everybody's contributing somehow," Astros manager Brad Mills said. "Sometimes it's a sac fly, moving runners over or hitting the ball to the right side of the infield. Sometimes we get a big home run."

Pence, who has 21 home runs and 75 RBIs, downplayed the significance of his blast.

"It's not one hit ever," Pence said. "You guys [in the media] make it out to be that, but there are a lot of defensive plays and a lot of guys getting on base before me. There are a bunch of situations in a ballgame that, if you watch a lot of baseball, you realize that. You just try to do your part. When the pitching gives up two runs or less, you're going to win a lot."

Five Astros relief pitchers combined to send down 12 of the Cardinals' final 13 hitters of the game, with Matt Lindstrom, Fernando Abad and Brandon Lyon each throwing a scoreless innings. Lyon locked down his 12th save of the season and his 11th in a row.

Lindstrom pitched a 1-2-3 seventh in his return from the disabled list. He had been out since Aug. 16 with a strained lower back, but set down Brendan Ryan, Pujols and Holliday in order to announce he was back and healthy.

"Facing some of the best hitters in the league in the first outing back is a confidence-booster, for sure," Lindstrom said.

"Everyone did a nice job today. The pitching was great, and we got timely hitting. All the guys contributed, and it feels so good to be back out there and with them again."