ST. LOUIS (AP) For the second straight day, the St. Louis Cardinals rallied against the hottest team in the majors.
Aledmys Diaz, Matt Adams and Yadier Molina each had an RBI during a four-run sixth inning and the Cardinals beat the San Francisco Giants 6-3 on Sunday night.
''We never feel like we're out of it and tonight was a good example,'' said leadoff man Matt Carpenter, who had three hits and an RBI. ''We can score a bunch of runs and we can do it in a lot of different ways.''
On Saturday, they homered four times in nine at-bats and scored seven straight runs in a 7-4 victory. This time it was three hits, a walk, a hit batter and an error.
Starter Carlos Martinez said he stayed in the dugout after being taken out so he'd have a good view of the comeback.
''I feel I did a really good job of staying in the game and getting out of situations,'' Martinez said through an interpreter. ''I'm always positive.''
Carpenter is batting .429 (15 for 35) with eight extra-base hits since returning from paternity leave.
''This game's such a game of ups and downs and flows and hot streaks and cold streaks,'' Carpenter said. '''I'm going through a stretch right now where I'm seeing the ball good.''
The tiebreaking run came on an RBI fielder's choice with the bases loaded by Molina, who entered the at-bat in an 0-for-20 skid. Shortstop Brandon Crawford made an error on the play when he dropped the ball on the exchange trying to flip to second to start a double play.
Jarrett Parker hit a two-run homer for the NL West-leading Giants, who have lost two straight for the first time since May 8-10 when they dropped three in a row. Despite dropping the weekend series, the Giants are a major league-best 18-6 since May 11.
Martinez (6-5) allowed three runs in six innings and Trevor Rosenthal earned his 10th save in 11 chances.
Giants manager Bruce Bochy used three relievers in the sixth trying to preserve the lead for Jake Peavy (2-6), who missed a chance at his 150th career victory.
''I was going to use my guys to try and stop it there,'' Bochy said. ''I thought that was the ballgame. They did a good piece of hitting that inning.''
Peavy allowed four runs in five innings. His next shot at No. 150 will be next Sunday, due to off days that will mean extra rest for all of the pitchers.
''It just stinks that we couldn't find a way to stop the bleeding,'' Peavy said. ''I certainly didn't and things obviously didn't get any better after I left, unfortunately.''
Parker, who started all three games in the series in place of injured Hunter Pence, snapped a 2-for-19 slump with his second homer in the fourth for a 2-1 lead. A hit, walk and run-scoring groundout by Crawford made it 3-1 in the sixth.
Martinez threw three wild pitches after entering with three on the year.
Giants: Hunter Pence (hamstring) will undergo surgery Thursday in Dallas and is expected to miss eight weeks. ... Matt Cain (hamstring) threw a second bullpen session Sunday and is likely to throw a simulated game Wednesday.
Cardinals: SS Jhonny Peralta (thumb) returned to St. Louis after going 0 for 4 and playing 3B for Class A Palm Beach and is expected to be activated off the 15-day DL on Tuesday. Peralta will play 3B due to the emergence of Diaz.
Giants C Buster Posey got a routine day off. He's in a 2-for-24 slump.
Giants: Albert Suarez (1-1, 3.18) makes his second career start Tuesday in the opener of a two-game series against the Red Sox. He's filling in for Cain.
Cardinals: Mike Leake (4-4, 3.82) makes his first career appearance against the Reds on Tuesday to start a six-game trip. He's 4-1 with a 1.59 ERA his last five outings.