Chris Carpenter claims he has no idea where the St. Louis Cardinals rank in the overall NL standings. He's one big reason they're getting close to the top, where the Los Angeles Dodgers are teetering.

Rick Ankiel put St. Louis ahead with a two-run homer in the seventh inning, and Carpenter pitched eight innings of five-hit ball in the Cardinals' ninth victory in 10 games, 3-2 over Los Angeles on Monday night.

Albert Pujols hit his major league-leading 39th homer as the Cardinals opened a seven-game California road trip by persevering against knuckleballer Charlie Haeger, who was largely outstanding in his debut for Los Angeles.

Carpenter (13-3) fell behind twice, but Pujols and Ankiel connected to ensure his fifth consecutive victory. St. Louis moved within 2 1/2 games of the Dodgers' overall NL lead, though that's news to the Cardinals' ace.

"I don't know what our numbers are," said Carpenter, who had eight strikeouts. "I don't know what our record is. I do know we've got a chance to win every time we come to the ballpark, and that's exciting. You can't not get excited about a game like this in a ballpark like this against a team like this."

Carpenter has gone 8-0 with a 2.12 ERA in his nine starts since July began.

Ankiel homered after Haeger (0-1) hit Ryan Ludwick with a pitch, sending a knuckleball that didn't knuckle deep into the right-field corner.

"There's no yellow light, there's no warning sign, if the knuckleball decides to tumble to the wrong guy," Dodgers manager Joe Torre said.

Ryan Franklin really had to earn his 30th save, getting Manny Ramirez on a first-pitch popout and retiring Casey Blake on a fly to the fringe of the warning track.

James Loney had an RBI single in the fifth for the Dodgers, who opened a tough seven-game homestand with their fourth loss in five games. With numerous pitching woes and an inconsistent lineup, Los Angeles is three games below .500 since the All-Star break.

"You've got to give him credit," Ramirez said of Carpenter. "He didn't make a lot of mistakes out there, and when you've got a Cy Young-type pitcher like that pitching and he doesn't make mistakes, he's going to be tough to hit."

Matt Holliday, who went 1 for 4, fouled a pitch off his leg in the ninth, but stayed at the plate after examination from the training staff. He beat out an infield single before leaving the game for pinch-runner Colby Rasmus, and manager Tony La Russa planned to wait until Tuesday afternoon to decide whether he'll play.

Padres 4, Cubs 1

At San Diego, Rookie Kyle Blanks hit a three-run homer with two outs in the bottom of ninth for the Padres.

The Cubs were one strike away from securing a 1-0 win when Chase Headley doubled off Kevin Gregg (4-5) to score David Eckstein, who walked with one out, from first base.

Kevin Kouzmanoff was intentionally walked before Blanks hit his seventh homer.

Heath Bell (5-2) pitched one inning for the win.

Braves 9, Diamondbacks 4

At Atlanta, Ryan Church hit a three-run double to highlight a six-run third inning for the Braves.

Tommy Hanson (8-2) gave up six hits, no walks and two runs in six innings for his third straight win. The rookie right-hander struck out seven.

Garret Anderson gave the Braves a 1-0 lead with a second-inning homer, and Adam LaRoche added a two-run shot off Max Scherzer in the sixth.

Scherzer (7-7) gave up six hits and nine runs, three earned, in five innings. His throwing error in the third made all the runs in it unearned.

Stephen Drew and Mark Reynolds homered for Arizona.

Giants 10, Mets 1

At New York, Aaron Rowand homered and had four hits, and San Francisco won to split the four-game series.

Pinch-hitter Nate Schierholtz chased Livan Hernandez (7-8) with a two-run double in a three-run sixth inning that broke it open. Randy Winn added three hits for the Giants, who set a season high with 18.

San Francisco moved within one game of Colorado for the NL wild-card lead.

Gary Sheffield had an RBI single for the Mets.

Joe Martinez (3-1), who has won twice in three starts, allowed one run and five hits in five innings.

Pirates 9, Brewers 5

At Pittsburgh, Andy LaRoche, Garrett Jones and Ronny Cedeno homered and the Pirates ended an eight-game home losing streak with only their second victory in 14 games overall.

Mike Cameron and Price Fielder homered for the Brewers, who fell seven games behind Colorado in the NL wild card.

Kevin Hart (4-2) earned his first win in three starts since being acquired from the Chicago Cubs on July 30. He allowed four runs and nine hits in six innings.

LaRoche hit his sixth homer, a solo shot in the second off Carlos Villanueva (2-10).