ST. LOUIS -- David Freese and the St. Louis Cardinals are really enjoying the final stretch.

Freese drove in five runs with a go-ahead three-run homer and a triple, and the surging St. Louis Cardinals beat the New York Mets 6-5 Wednesday night for their 12th win in 14 games.

With the win, the Cardinals moved within 1½ games of Atlanta in the National League wild-card race. St. Louis, a season-high 17 games over .500 (86-69), has seven games left and will go for a sweep of the Mets on Thursday.

"The real fun in this game is to play meaningful games this time of year and you have the most fun playing in October," Cardinals manager Tony La Russa said. "The guys are having a lot of fun because we played ourselves back into this. You can feel it."

Freese certainly enjoyed watching his homer, which gave the Cardinals a 6-4 advantage in the seventh.

"That was a good feeling," Freese said. "Obviously, the biggest hit of my career and getting that win is huge."

The Mets fell to 73-82, ensuring the third straight losing season for the big-spending ballclub that has been plagued by injuries and off-field financial woes this year.

Jaime Garcia (13-7), making his 30th start, pitched around four unearned runs in 7 2/3 innings. He gave up six hits and struck out five.

"What Jaime did, not getting frustrated and keeping us in the game, was classic," La Russa said.

Jason Motte got four outs for his eighth save in 12 opportunities but allowed a solo home run to Willie Harris in the ninth.

Pujols went 2-for-4 with two runs scored to extend his hitting streak to six games and up his average to .305. Pujols has now reached base safely in 37 straight games. He is hitting .500 during his six-game streak (13-for-26).

Allen Craig drove in the Cardinals' other run with an RBI single.

New York manager Terry Collins said the Cardinals might be a tough out if they can make the playoffs.

"They got a good team," Collins said. "The lineup's tough. I know Edwin Jackson will help them pitching-wise. He's a good pitcher. They got a lot of weapons. Coming off the bench they got speed and defense."

Mets shortstop Jose Reyes went 1-for-4, dropping his average to .330 and tying him with Milwaukee's Ryan Braun for the National League batting lead.

The Mets led 4-3 after six and the Cardinals were going quietly in the seventh when Pujols singled to center off reliever Miguel Batista with two outs.

Collins brought in lefty Daniel Herrera (0-1) to make Lance Berkman bat right-handed, but Berkman foiled the strategy by singling to left.

Collins then went to righty Pedro Beato and Freese tagged him for a 389-foot, opposite-field homer to right to give the Cardinals a 6-4 advantage. The homer was the 10th for Freese, who has 54 RBIs.

"I tried to go fastball low and away," Beato said. "I was behind in the count and trying not to walk him in that situation. I left the pitch right out over the middle of the plate and he took a good swing at it."

With a 3-0 lead, Garcia struck out the first two batters to begin the third. But Mets starter Chris Schwinden kept the inning alive with a single to right and Reyes followed with a double down the left-field line. Both scored when Angel Pagan's grounder went under shortstop Rafael Furcal's glove for an error to make it 3-2.

David Wright followed Pagan with an infield single in the hole to shortstop. Pinch hitter Josh Satin then gave the Mets a 4-3 advantage with a double to the gap in left-center.

Schwinden retired the first two batters he faced to begin the game, but then gave up a double to right to Pujols. He then intentionally walked Berkman, and Freese made him pay for that with a triple down the right-field that scored Pujols and Berkman.

The Cardinals loaded the bases in the second with one out on an infield single by Yadier Molina, a double by Skip Schumaker and a hit-by-pitch to Furcal. Craig singled to center to make it 3-0, but Schwinden got Pujols to pop out to first and Berkman to fly to left to end the threat.

Game notes

New York's Chris Capuano (11-12) will face the Cardinals' Jake Westbrook (12-8) in the series finale Thursday. ... Satin pinch-hit for Lucas Duda, who left the game with dizziness after running into the wall trying to catch Freese's triple. ... Garcia had five strikeouts, giving him 151 for the season. He is the 17th left-handed Cardinals pitcher to reach 150 strikeouts in a season and the first since Rick Ankiel fanned 194 in 2000. ... Schumaker's second-inning double snapped an 0-for-15 skid.