SAN FRANCISCO (AP) David Freese delivered a crushing hit right after the Giants tied the game, and Jaime Garcia had a lead again when he headed back out to the mound in the bottom of the seventh.
Garcia matched his career high with nine strikeouts, Freese hit a go-ahead solo home run in the seventh inning, and the St. Louis Cardinals gave manager Mike Matheny a victory against his old Giants team with a 4-1 win Wednesday night.
Freese won't go as far as to say he's back on track at the plate following an 0-for-17 funk, but this is certainly a start.
''That's one way to turn it around a little bit,'' he said. ''Just a big hit for Jaime. He pitched his tail off. Facing this type of team in this type of environment, it's nice to help him get a win like that.''
Buster Posey hit a tying RBI single in the sixth against Garcia (3-2) for San Francisco, which missed multiple scoring chances yet again in what has been the biggest downfall for this bunch.
Pinch-hitter Skip Schumaker added a two-run double in the eighth for the Cardinals, who improved to 13-7 on the road.
In a matchup of the last two World Series champions, the Giants didn't do enough to back Madison Bumgarner (5-3). He lost his second straight start following a five-start winning streak on a breezy Bay Area night featuring a hovering mist above the field.
Garcia, who pitched a three-hitter in a 9-0 win over the Giants on Aug. 22, 2010, in St. Louis, had another memorable performance on the mound - his nasty off-speed stuff keeping the Giants guessing.
''He had it right from the beginning,'' Matheny said. ''He gets going like that, and it's going to be fun to watch him.''
While he allowed nine hits in 7 1-3 innings, Garcia didn't issue a walk for the first time this year and threw an efficient 92 pitches. The lefty also struck out nine San Francisco batters on April 9, 2011.
''It was a really tough lineup and place to play, and I was able to stay in control of the game,'' he said.
Jason Motte pitched the ninth for his seventh save in nine opportunities.
Slugger Carlos Beltran missed his third straight game for St. Louis with a sore and stiff right knee, but he could be available in Thursday afternoon's series finale against his former club. Beltran spent the second half of 2011 with the Giants after a trade from the New York Mets.
St. Louis took the lead in the first when Rafael Furcal scored on Allen Craig's fielder's choice. Furcal and Freese each had three hits. Freese connected for his eighth home run with a shot into the tunnel area in left field with two outs in the seventh, then doubled in the ninth.
Freese also singled in the fourth to snap his hitless streak, helping the Cardinals win consecutive games after they avoided an 0-5 homestand by beating the Chicago Cubs 7-6 on Tuesday.
''I'm not looking at it like I'm finally getting breaks, because I've been terrible the last week,'' Freese said. ''It's not like I've been lining balls, this and that. I had a rough week.''
The Giants squandered chances in the early innings. San Francisco had baserunners reach at least second base in the second, third and fourth innings, stranding runners at third in the second and fourth.
Bumgarner had his eight-start home winning streak snapped, a run dating to his last loss here on Aug. 4, 2011, against the Phillies. The lefty missed a chance to move closer to Ron Bryant's streak of 10 consecutive home victories in 1972-73.
Bumgarner didn't allow a walk for the first time this season, giving up seven hits in 7 1-3 innings. He gave up at least four earned runs for the second straight outing.
The Giants made a late lineup change, scratching left fielder Melky Cabrera with a left toe injury. Nate Schierholtz moved into the lineup in right field, with Gregor Blanco shifting to left.
Cabrera pinch hit with two outs in the eighth and runners on the corners and grounded out on the first pitch he saw. The Giants were 2 for 11 with runners in scoring position and are 6 of 37 (.162) in such situations in three games so far this homestand.
''Tonight was probably our worst night, I thought, the at-bats with runners in scoring position,'' San Francisco skipper Bruce Bochy said. ''We're just getting too anxious, too aggressive and really chasing pitches. Their pitcher did a great job. He knew that and he let the guys expand the zone.
Bochy even pulled out one of former Cardinals manager Tony La Russa's old stops.
Bumgarner batted eighth and Emmanuel Burriss in the ninth spot to give the Giants ''a couple leadoff hitters, a couple speed guys back-to-back,'' Bochy said. ''I know Tony did it.''
Bochy did the same thing on May 20, 2010, at Arizona. He hit Tim Lincecum eighth and Andres Torres ninth.
Furcal was in an 0-for-9 streak before hitting singles in his first two at-bats.
NOTES: There were no walks. ... Pagan has hit safely in 27 of his last 28 games. ... It was 53 degrees with wind and fog at first pitch. ... Giants 3B Joaquin Arias was off after being hit in the left forearm during Tuesday's 5-4 loss to Colorado. ... San Francisco 2B Freddy Sanchez received an epidural in his inflamed lower back and Bochy called it a ''setback,'' but the manager believes Sanchez will return this year. ... The teams play their other four games of the year Aug. 6-9 at Busch Stadium. ... Cardinals C Yadier Molina had the night off after playing the previous two games. ... Bumgarner allowed only 10 earned runs in his first 39 innings this season but has given up eight in his last 13 1-3 innings.