Updated

San Francisco, CA (SportsNetwork.com) - Adam Wainwright pitched scoreless ball into the eighth inning, and the St. Louis Cardinals downed the San Francisco Giants, 2-0, in the middle test of a three-game series.

Wainwright (11-4) collected his NL-leading 11th victory by scattering four hits and two walks over 7 2/3 terrific frames, effectively lowering his ERA to a minuscule 1.89.

St. Louis' offense gave Wainwright some early support as Matt Carpenter and Matt Holliday both singled in a run in the third inning.

"It was nice to get a little bit of room," Cardinals manager Mike Matheny said. "We'll take what we got."

Those runs ended a string of 26 consecutive innings the Cardinals had not scored, and even though they could not muster anything else off Giants starter Ryan Vogelsong, it was enough to halt a three-game slide.

Vogelsong (5-5) struck out eight over seven innings and gave up two runs on six hits to take a hard-luck loss.

"We needed a great effort going against one of the elite pitchers in the game, and (Vogelsong) gave us what we needed," Giants manager Bruce Bochy said. "We just couldn't get any runs for him,"

San Francisco fell to 2-7 over its last nine games and has been shut out three times during the tough stretch.

Oscar Taveras opened the away third with a double and moved to third on a Mark Ellis base hit. After Wainwright failed to put down a bunt, Carpenter dribbled one through the middle to knock in Taveras, and Holliday followed with an opposite-field RBI single.

Wainwright retired 15-of-16 hitters before finally hitting a speed bump in the eighth when Joe Panik and pinch-hitter Hector Sanchez each singled with two away to put runners on the corners.

With his ace's pitch count at 107, Matheny went to his bullpen, and his decision to insert Pat Neshek paid off as the reliever got Gregor Blanco on popup to short to end the threat.

Trevor Rosenthal shook off a leadoff single in the ninth to post his 25th save of the season and finish off St. Louis' MLB-leading 16th shutout.

Game Notes

San Francisco has not won consecutive home games since a three game sweep of the Mets on June 6-8 ... Wainwright has allowed two runs or less in nine of his last 10 outings, the lone outlier coming on May 30 against the Giants, who shelled him for seven runs in less than five innings ... Carpenter recorded three of the Cardinals' eight hits.