CHICAGO (AP) -- The weather at Wrigley Field may change in an instant, but Aramis Ramirez is always steady in the clutch.
After getting shut down by Giants starter Matt Cain for seven innings as the wind whipped in from Lake Michigan, the Cubs struck quickly against his replacement and held off a ninth-inning rally to send the Giants to their fifth straight loss.
Ryan Theriot led off the bottom of the eighth with a single off Tyler Walker and Mike Fontenot sacrificed him to second. After Walker (3-5) intentionally walked Derrek Lee, Ramirez launched the first pitch just inside the foul pole in left for his 17th home run, sending the packed crowd into a frenzy.
"He always seems to come through in the clutch like that," Theriot said. "He's definitely the guy we want at the plate in that situation and he's proven time and time again, that's when he shines."
After Theriot went to second, Giants manager Bruce Bochy called for the intentional walk of Lee, hoping Walker could get a double play.
"You're caught in a hard spot," Bochy said. "You've got two great hitters, similar-type hitters. We were hoping maybe to get out of it with one pitch. They've got two great hitters back-to-back. You're going to face one of them."
Ramirez said he agreed with Bochy's strategy. In that spot, he said he wasn't trying for a home run.
"You don't want to think home run in that situation," Ramirez said. "You just want to try and put the ball in play. If you hit it on a line, maybe it goes out. But if you hit it in the air, it's not going to go out."
Cubs manager Lou Piniella wouldn't say Ramirez is his best clutch hitter, but said he's certainly up there.
"Ramirez is a professional hitter, and he gives you a professional at-bat," Piniella said. "He's got an idea what he wants to do and he goes up there and makes adjustment. He got a good fastball to hit and he hit it really well."
The Giants have scored four runs total in the last four games, and barely avoided being shut out for the third time in those four games, wasting a great effort from Cain.
"It's a hard one to lose when you get that kind of pitching effort," Bochy said. "When Matt's on like he was today, he's tough."
"Woody came in and closed it, made that a little exciting too," Piniella said. "But it's in the win column."
Cubs pitcher Jason Marquis had a no-hitter going into the fifth until John Bowker led off with a single that bounced off Marquis' leg. Marquis was examined by the trainer but stayed in the game.
Marquis gave up three hits and two walks, striking out four, in seven innings. He got skipped in the rotation after losing to Cain 2-1 on July 1, giving him a fresh arm to work with.
"He worked that sinker in and out, and the slider too," Bowker said. "When you're hitting your spots like that, it's tough to get a rally going."
Two hours before the game, it looked like a repeat of Thursday's fireworks, when the Cincinnati Reds hit seven homers in a 12-7 win. The wind was blowing out and the temperature was climbing toward the 90s during batting practice before rain clouds came in and the wind shifted directions.
"The wind was blowing out in BP and we were having fun watching Carlos [Zambrano] hit balls out of the ballpark," Marquis said. "I was inside watching TV and a couple guys came in and said it's 15 degrees cooler and the wind's blowing in. I didn't believe them."
The Cubs were stymied by Cain for the second time this month, as the big right-hander gave up three hits and struck out nine in seven innings. When he beat the Cubs 10 days ago, he threw eight scoreless innings and struck out 10.
"I was trying to go at them," Cain said. "They're definitely a club that can swing the bat well, so maybe you try to use some of those aggressive swings a little bit to your advantage."
Cain gave up just one hit through his first five innings, a Theriot flyball that could've been ruled an error. Durham dropped it drifting back in shallow right, and the play was initially ruled an error, but was quickly changed to a hit.
The Cubs recalled RHP Kevin Hart and optioned RHP Michael Wuertz to Triple-A Iowa. ... The Giants recalled INF Ivan Ochoa and optioned INF Travis Denker to Class A San Jose. ... Giants OF Fred Lewis broke an 0-for-15 slump with a single in the sixth. ... Giants OF Randy Winn left the game in the third with a right knee contusion. He fouled a ball off his knee in the first. Velez replaced him. Bochy said he's day-to-day. ... Cain threw 115 pitches, while Marquis threw just 81. ... Theriot had his 36th multi-hit game of the year, tying him with Washington's Cristian Guzman for the NL lead.