Chris Carpenter pitched eight strong innings for-4 with a homer and two RBI as the Cardinals beat 2, to avoid a three-game sweep.

Rafael Furcal and Pujols both went deep in the first inning after the Brewers were spotted a 2-0 lead.

Lance Berkman singled in Jon Jay with the go-ahead run in the third, as St. Louis moved within four games of the first-place Brewers in the NL Central.

Carpenter (8-8) gave up 10 hits and won for the seventh time in his last eight decisions. It was a big turnaround for the right-hander, as he was 0-2 with an 8.18 ERA in two previous starts against the Brewers this season.

Fernando Salas fanned two batters in the ninth inning to notch his 22nd save.

Mark Kotsay and Prince Fielder each had RBI hits for the Brewers, who lost for just the second time in their last 15 games.

Yovani Gallardo (13-8) was saddled with the loss after allowing seven hits and five runs -- four earned -- over five frames.