Updated

Xavier Nady produced two RBI singles and Tim Lincecum pitched masterfully, as the San Francisco Giants defeated the Colorado Rockies, 6-3, in the second contest of a four-game series at AT&T Park.

It appears Lincecum (10-14) has been saving his best for the home stretch. The right-hander struck out six and did not allow a run in 6 1/3 innings. He has given up just 11 earned runs over his last six starts.

"I feel like I'm getting back to (where I was) but there's that fine point where you feel like you're going out there and everything is just kind of working by itself," said Lincecum. "I haven't reached that point yet. I still feel like I'm grinding a little but those harder situations are getting easier to get out of."

Marco Scutaro added three hits, scored twice and drove in a run as the Giants took one step closer to capturing the NL West title -- cutting their magic number to seven games.

The Giants touched up Jeff Francis (5-6) early and chased him from the game after five innings. He allowed two runs on six hits and lost for the second time in as many starts.

Wilin Rosario hit a two-run homer in the top of the eighth for the Rockies, who have lost 11 of 13.

Nady came through with clutch base hits in both the second and sixth innings. Hector Sanchez hit a two-out double in the second and Nady stroked a line drive to center to give the Giants an early 1-0 lead. After Hunter Pence drove in a run with a sacrifice fly in the third, he came around to score in the sixth on Nady's ground ball single through the left side of the infield, making it 3-0.

The Rockies were able to load the bases in the seventh, which led Giants manager Bruce Bochy to go to his bullpen. Jeremy Affedlt relieved Lincecum and on his first pitch induced pinch-hitter Jason Giambi in to an inning-ending double play.

Josh Roenicke pitched the bottom half of the frame and gave up a leadoff single to Scutaro, who moved to second on a wild pitch. Scutaro advanced to third on a Pence groundout and sprinted home on another wild pitch from Roenicke to make it 4-0.

Rosario's two-run homer in the eighth made it a two-run ball game but the Giants got two back in the bottom half off a run-scoring triple from Angel Pagan, who came then crossed the plate on a single from Scutaro.

The Rockies got a two-out RBI single from Matt McBride in the top of the ninth to bring them within three, but Serio Romo retired Dexter Fowler on a ground ball to end the game.

"They just pecked at us and pecked at us," Rockies manager Jim Tracy said. "They built a four-run lead, we hit the home run, and then gave two back."

Game Notes

Scutaro extended his hitting streak to eight games ... The Giants have won 14 of their last 20 games ... Dating back to 2011, the Rockies have lost 25 of their last 34 games against the Giants.