The St. Louis Cardinals used power to tie the game, and took advantage of a mistake by the Chicago Cubs to win it.

Greg Garcia hit first career home run - a pinch-hit blast in the eighth inning - and Peter Bourjos scored the winning run from third on a bases-loaded, no-out, throwing error by Mike Baxter to help the Cardinals to a 3-2, 10-inning win in a battle of NL Central rivals.

It was St. Louis' fourth win in a row and seventh straight at home, and the Cardinals improved to a major-league best 27-7 at home.

With the game tied in the 10th, Jhonny Peralta slapped a routine grounder to second base, where Baxter — the right fielder — had come in to play with the bases loaded, giving the Cubs five infielders. Baxter cleanly fielded the ball and had plenty of time, but threw wildly to the third-base side of the plate.

"I threw it away, I didn't make the play," Baxter said. "It's something I'm very capable of doing."

Bourjos began the 10th inning with a double off reliever Justin Grimm (1-2). Kolten Wong followed with a single off the second base bag and Matt Carpenter was walked to load the bases.

Seth Maness (2-0) picked up the win in relief.

Chicago lost its third in a row after a four-game winning streak.

Garcia set up the Cardinals' sixth extra-inning win in nine tries with his homer off Pedro Strop leading off the eighth that tied it at 2. It was the Cardinals' first pinch-hit homer of the season — from an unlikely source.

"I'm not a power hitter by any means," Garcia said.

Garcia is 3 for 4 as a pinch-hitter since being recalled from Triple-A Memphis on June 19.

"I had a feeling he was going to throw me a fastball," Garcia said. "I put a good swing on it. It was surreal. I can't even put it into words."

St. Louis manager Mike Matheny was confident that Garcia would at least get on base.

"I figured he'd go up there and put a pretty good rip into it," Matheny said. "I didn't expect to see the ball leave (the park). What a great surprise. He's done a nice job whenever we do get him an opportunity."

Kris Bryant gave Chicago a 2-1 lead by driving in Dexter Fowler with a sacrifice fly to center in the seventh off Cardinals starter John Lackey, who gave up two runs on eight hits in seven innings. Fowler started the inning with a double.

"It was a tough one, they put some good at-bats on me," Lackey said. "A lot of deep counts and I had to throw a lot of pitches. But for the most part, I was able to do some good damage control."

Chicago starter Jake Arrieta allowed just one run on three hits over seven innings.

"I got into a groove and was able to hold them off," Arrieta said. "But they did what they do, they fought back. This was a tough one. We were right there."

Randal Grichuk gave St. Louis a 1-0 lead with a run-scoring triple in the second.

Chicago, which had scored just three runs over its previous three games, tied the game in the fourth on a RBI single by Baxter, who had three hits and helped Arrieta with a leap into the stands to snare a flyball by Peralta leading off the sixth.

The Cardinals are 27-18 against the Cubs over the last two-plus seasons.

"This one stings," Chicago first baseman Anthony Rizzo said. "You can't give away a lead there."