SAN FRANCISCO -- St. Louis Cardinals right-hander Adam Wainwright extracted a measure of revenge against the San Francisco Giants, throwing 7 2/3 innings of shutout ball in a 2-0 victory Wednesday night.

Wainwright became the National League's first 11-game winner.

Third baseman Matt Carpenter continued his mastery of the Giants with three hits, including a run-scoring single, as the Cardinals beat San Francisco for just the second time in six meetings this season while evening the current three-game series at 1-1.

Wainwright, who was shelled for a season-worst seven runs in 4 1/3 innings in a 9-4 home loss to the Giants on May 30, dominated the rematch until leaving the game with two on in the eighth.

Right-hander Pat Neshek, called upon to face a left-handed hitter, induced Giants center fielder Gregor Blanco to pop out on a full-count pitch to end the eighth. Closer Trevor Rosenthal then survived an overturned call at first base, which gave Giants right fielder Hunter Pence an inning-opening single, for his 25th save.

Wainwright (11-4) followed up the loss to the Giants with a 2-1 record and 1.16 ERA in the month of June. He continued his fine form Wednesday by allowing only four hits, all singles. He walked two and struck out just one in recording his seventh road win of the season.

Right-hander Ryan Vogelsong (5-5) was the hard-luck loser for the Giants, who for the second week in a row failed to build upon any momentum gained by a Tim Lincecum shutout.

Lincecum, who no-hit the San Diego Padres last Wednesday one night before the Giants were silenced 3-1 by the Cincinnati Reds' Mike Leake, blanked the Cardinals over eight innings in San Francisco's 5-0 win in Tuesday's series opener.

Carpenter, batting leadoff, went 3-for-4 to lead the Cardinals' eight-hit attack. St. Louis had accumulated a .176 batting average in its first five games against the Giants this season.

Carpenter began the night with the best batting average (.500) against the Giants of any San Francisco opponent with at least 50 plate appearances against the club. He improved that mark to .520 (26-for-50) by night's end, extending his hitting streak against the Giants to 10 games.

Left fielder Matt Holliday also had a multi-hit game for the Cardinals, contributing two singles and an RBI to the win, St. Louis' fourth in nine games on a 10-game trip that ends Thursday.

Vogelsong, who allowed only five hits and one run in a similar loss to Cincinnati in his previous start, was pulled after seven innings with the Giants trailing 2-0. Four of the six hits he allowed came in the third inning, when the Cardinals scored the game's only two runs. He struck out eight and walked one.

Second baseman Joe Panik, just 2-for-17 on the Giants' homestand entering the game, had two of San Francisco's five hits.

The Giants, now 2-7 on their homestand, have not won consecutive games at home since June 7-8.

Carpenter's second hit, a third-inning single, got the Cardinals on the scoreboard and ended the team's 26-inning scoreless drought. It also gave St. Louis its first lead since Friday night against the Los Angeles Dodgers.

The hit scored center fielder Oscar Taveras, who led off the inning with a double.

Holliday followed Carpenter's RBI single with one of his own, scoring second baseman Mark Ellis to make it 2-0.

NOTES: Giants CF Angel Pagan will get an epidural injection Thursday in Los Angeles in hopes of soothing a bulging back disk. The Giants hope Pagan will be ready to begin baseball-related activities as early as Monday. ... St. Louis' Oscar Taveras started in center field for the first time. He played right field in all 12 of his previous games for the Cardinals. ... San Francisco 1B Brandon Belt was scheduled to make his final rehab appearance for Triple-A Fresno on Wednesday. The Giants are expected to activate Belt from the disabled list Friday. ... Cardinals 2B Kolten Wong (bruised left shoulder) and RHP Joe Kelly (strained left hamstring) made encouraging rehab starts for Triple-A Memphis on Tuesday. Wong belted a three-run homer in his first game for Memphis, while Kelly, in his second minor league start, pitched four shutout innings. ... According to Baseball America, the Giants signed three Dominican players and the Cardinals signed one on the first day of the international-signings window Wednesday.