Bengie Molina and Pablo Sandoval hit back-to-back home runs in the seventh inning and the San Francisco Giants avoided a three-game sweep with a 4-1 victory over the Colorado Rockies on Wednesday night.

After Molina's one-out homer off Livan Hernandez tied the game at 1, Sandoval connected for his first major league homer with a drive just inside the left-field foul pole _ and that was it for Hernandez (1-3). It marked just the second time this year San Francisco has hit consecutive homers. Molina and Aaron Rowand did it on May 23 at Florida.

Tim Lincecum (15-3) struck out 10 to boost his majors-leading strikeout total to 210 and he owns the 10th highest season strikeout total in San Francisco history. Lincecum lowered his ERA from 2.48 to 2.43, tied for best in the big leagues with Cleveland's Cliff Lee. Lee and Lincecum both have allowed 50 earned runs in 185 1-3 innings.

The crowd at the Giants' waterfront ballpark roared in delight when Lincecum came out to start the eighth, then booed manager Bruce Bochy when he removed the All-Star after two outs and a career-high 132 pitches. Lincecum walked off the mound to a standing ovation.

He won three straight starts for the first time since April and won his fourth consecutive decision, improving to 13-2 in 22 starts following San Francisco losses.

The 24-year-old right-hander struck out the side in order in the third, getting Matt Holliday on a called third strike clocked at 96 mph. Lincecum had his seventh 10-strikeout game this season _ tied for third-most in San Francisco history _ and ninth of his young career.

After Jack Taschner allowed a single to Brad Hawpe, he was quickly replaced by closer Brian Wilson. Wilson got Garrett Atkins on a foul pop up to end the eighth, then worked the ninth for his NL-best 36th save in 39 opportunities.

The Giants scored two insurance runs in the eighth, one on an error.

Troy Tulowitzki hit an RBI single in the second for Colorado's lone run. The Rockies missed a chance to pull within five games of NL West-leading Arizona.

Dave Roberts tripled with one out in the sixth for San Francisco, but was thrown out at home on a double play that ended the inning after Fred Lewis flied out to center and Willy Taveras made a perfect throw to the plate.

Notes:@ Lincecum's previous career high for pitches was 122. ... Colorado RHP Matt Herges, on the DL since Aug. 20 with lower back stiffness, was set to begin a rehab assignment with Triple-A Colorado Springs. He is likely to play two out of three days then rejoin the Rockies on Sept. 2, the first day he's eligible to be activated. ... Injured Giants pitchers Noah Lowry (forearm surgery) and Merkin Valdez (strained elbow) are scheduled to throw off a mound in Arizona this weekend while the team is on the road. ... Giants LHP Jonathan Sanchez is slated to come off the DL and return to the rotation Monday at Colorado. Sanchez was scratched from his start against Atlanta on Aug. 16 and placed on the DL with a strained throwing shoulder.

Copyright 2008 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.