SAN FRANCISCO -- On Monday, Ryan Vogelsong knew it was his turn to deliver.
After watching the past three Giants starters last until the ninth inning with impressive pitching performances, Vogelsong contributed his own solid seven-inning outing to lead the Giants to a 3-2 win against the Cubs.
"It's a hard act to follow," Vogelsong said. "After three games like that, you don't want to be the guy that doesn't come through with a big game. It was definitely weighing on my mind a little bit this morning."
Vogelsong gave up two runs on eight hits, and the Giants completed their first sweep of the season and the first four-game sweep of the Cubs since June 17-20, 1999.
"I felt like that was definitely the best all-around stuff I had," Vogelsong said. "It's kind of surprising I let up that many hits, but that was probably the best I've felt stuff-wise this season."
The right-hander was backed by a Giants offense that, as manager Bruce Bochy described, "scratched and clawed" its way to some runs.
The Giants were 1-for-14 with runners in scoring position and left 11 runners on base, but a career-high four walks from Buster Posey and a Cubs defensive blunder allowed the Giants to produce enough runs for the win.
Posey, who walked to lead off three innings, scored the game-tying and go-ahead runs. Joaquin Arias grounded into a double play with the bases loaded to score Posey in the seventh and give the Giants a 3-2 lead, and lefty reliever Jeremy Affeldt came in to pitch two scoreless innings for his first save of the season.
The Giants got some help from the Cubs' Starlin Castro to get to that point.
Brandon Crawford's fielder's choice in the fifth with the bases loaded and one out scored Posey to tie the game at 2. On the play, Castro fielded the ball near second base and touched the bag, then proceeded to trot towards the Cubs' dugout without attempting the double play, having thought there were two outs.
"It's the last straw," Cubs manager Dale Sveum said. "If he wants to play, he better start getting his head in the game, period."
In the seventh, shortstop Ryan Theriot saved a run with an acrobatic play on a hard-hit grounder from Castro with Adrian Cardenas on third base with two outs. After Theriot stopped the ball with his glove, it flipped up in the air near his face. Theriot grabbed the ball and quickly threw to first.
"I gave him a big hug after that one," Vogelsong said. "For me, I felt like that saved the game for us."
The Cubs struck first in the second when Vogelsong gave up five Cubs singles in the two-run inning, with Bryan LaHair and Darwin Barney crossing the plate.
"They hit some good pitches that inning," Vogelsong said. "It wasn't like I was making mistakes and they were hitting mistakes. I felt like they hit some good pitches, and I just kept trying to make them until one of them hit them at someone."
The Giants responded with a rally of their own in their half of the second, with back-to-back singles from Brandon Belt and Arias, followed by a Crawford double that plated Belt. Cubs starter Jeff Samardzija would eventually get Melky Cabrera to line out with the bases loaded to end the inning.
Samardzija threw 110 pitches in five innings, giving up two earned runs in the no-decision.
"I was battling all day," Samardzija said. "They were taking good at-bats."
Monday's outing left Vogelsong with a rotation-best 2.38 ERA, fifth-best in the National League.
The win mirrored the other three of the series -- a low-scoring affair anchored by strong starting pitching. The Giants won the four games by a total margin of five runs.
"The timely hitting has been there," Affeldt said. "Late in the ballgame when we needed a run, we've been able to get that key hit."
Prior to the win, the Giants had been one of only three teams in the Majors without a series sweep.
"What made it a little bit better is the fact that really these games could have gone either way," Bochy said. It's nice to finally get one. We've been close."
Jay Lee is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.