SAN FRANCISCO – The Cardinals found their bats and compiled more than a few hits as they completed their 10-game road trip against the National League Central on a winning note Thursday. St. Louis beat the Giants 7-2 at AT&T Park.

“All in all, you look at this road trip, especially these last two teams and who our guys have been facing,” Cardinals’ skipper Mike Matheny said. “We have had our hands full and to be able to go home at 5-5 is a huge accomplishment, especially after losing a real tough one in L.A. that could have changed view of this whole trip all together.”

Not only did the Cardinals score first and never trail, but they scored often, plating runs in four separate innings. Two of those innings saw the Redbirds plate multiple runs.

The Cardinals took a 2-0 lead in the first inning. Matt Carpenter opened the game with a walk and scored on Jhonny Peralta’s 12th home run of the year.

Manthey thought Carpenter’s first at bat helped set the tone for the offense.

“That at bat, his first at bat, set the tone for our offense I think,” Matheny said. “Obviously getting guys on base for Jhonny makes all the difference in that particular inning, but just how he worked and worked, especially from the left hand side against a lefty as tough as Madison is.”

On a 1-0 pitch, Peralta hammered the ball to left field. Giants’ left fielder Tyler Colvin looked like he was going to catch it then he gave way to center fielder Gregor Blanco who though he had it. But neither outfielder did as the ball sailed into the stands for a two-out home run.

“I think that was a weird reaction there because I see Colvin in left field and I see him do something with the hand,” Peralta said. “Not sure if he tried to catch the ball or what. In the morning, a lot of the guys told me, in this field here, they need hit it pretty good so they can go (out). When I hit the ball that I hit pretty good, I do not know for sure if it was a home run.”

The Giants struck back in the bottom of the third. Blanco opened the frame with a double and scored on Madison Bumgarner’s single to left.

In the top of the third, the Cardinals (46-40) scored three runs, thanks to an error by Giants first baseman Adam Duvall.

Yadier Molina reached on a single and advanced to second when Duvall’s throw to second on what should have been an inning-ending double play sailed into left field. Mark Ellis was safe at first on the play, giving the Cardinals runners at first and second instead of the inning being over. Jon Jay followed with a soft double to left, allowing Molina to score and moving Ellis to third.

With their lead back at two, the Cardinals weren’t done. Starting pitcher Carlos Martinez (2-3) one-upped Bumgarner with a two-run single, scoring Ellis and Jay to take a 5-1 lead. The two runs batted in were the first of Martinez’s career.

As bad as the top of the fourth went for Bumgarner (9-6), the Giants hurler still struck out the side while allowing three runs on 32 pitches. He would pitch only one more inning, leaving after five innings of work on 100 pitches.

Martinez got a big shutdown inning in the bottom of the fourth when he retired the side, in order, on 16 pitches. Martinez struck out the first two batters before getting the final batter to ground out.

The Giants tried to rally in the bottom of the fifth, but failed. With one out, Blanco reached on a bunt that Martinez dove for and came up short of making the play. Following a line out, Hunter Pence reached on a call that Matheny tried to get overturned via replay, but failed.

Joe Panik then walked to load the bases before Martinez struck out Buster Posey swinging to end the frame and the threat.

 “That was a big point in the game,” Matheny said. “They got us in a bad spot with a real good hitter at the plate.”

That was it for Martinez. The Cardinals’ rookie finished the day with 88 pitches, a season-high, over five innings of work. He struck out six, also a season-high, while scattering five hits and one walk.

“Carlos did a nice job on the mound,” Matheny said. “He gave us a chance and the bullpen came in and did a terrific job.”

Shane Robinson pinch hit for Martinez in the top of the sixth. With no out and Jay on first after reaching on a bunt, Robison tripled into the right field corner, scoring Jay.

The Giants (46-39) got a run off Sam Freeman in the bottom of the sixth only to see the Cardinals get their five run lead back half an inning later.

The Cardinals got their seventh inning run on what should have been another inning-ending double play. However, like in the fourth, an error allowed play to continue. This time it was the Giants’ pitcher, Yusemeiro Petit airmailing a throw over the second baseman into center field. Adams was able to score on the play, getting a run back that was lost when San Francisco scored in the sixth.

Every starting position player reached base safely at least once except Ellis as St. Louis tagged the San Francisco pitchers for 14 total hits, four free passes, and two errors.

One of the hits was by reliever Seth Maness. After retiring the Giants on eight pitches in the seventh, Matheny left Maness in when his spot led off the top of the eighth and he produced a solid single.

Carpenter continued his hot-hitting against the Giants, going 2-for-4 with a pair of doubles and a walk. He also extended his hitting streak to eight games.

“I don’t know if there is any rhyme or reason for it,” Carpenter said of his success against the Giants. “I think it is just one of those crazy things. I mean, I don’t know why, because they got good pitchers and they are always tough at bats. Luck has been on my side so far I guess.”

But he wasn’t the only Cardinal with multiple hits. Peralta singled in addition to his home run while Molina was 3-for-4 with a walk. Jay had a double and a bunt to reach twice.

“The guys put together a real good offensive day,” Matheny said. “We did leave some money on the table today, but we were able to kind of stick with it, big hits obviously with Jhonny getting us going with the home run and then (Jon) Jay and then Carlos (Martinez) helping himself out.”

While the Cardinals had runners on the bases all day, they also left 10 stranded.

“There was a lot more damage out there,” Matheny said. “We had, I counted six times with men on third and less than two outs that we just didn’t get the job done. That is a lot more damage that could have happened. We need to be better at that, but that is just a blip to me on a lot of positives that happened today.”

On the mound, Maness threw two perfect innings, retiring all six batters he faced. Maness needed just 15 pitches over his two innings of work. Jason Motte closed out the game with a perfect ninth inning. Motte threw 16 pitches and struck out two.

The Cardinals now return home to face the Marlins on Fourth of July weekend for the second consecutive year.