SAN FRANCISCO – Michael Cuddyer homered and hit a two-run double after coming off the disabled list, Tyler Chatwood beat San Francisco for the second time in seven days, and the Colorado Rockies blanked the Giants 5-0 on Friday night.

Carlos Gonzalez also hit a solo homer, and D.J. LeMahieu added an RBI single as the Rockies beat two-time NL Cy Young Award winner Tim Lincecum for the second time this week.

The Rockies, swept in a three-game series at AT&T Park last month, won their fourth in a row in the rivalry for the first time since 2006.

Cuddyer’s two-out double in the first gave Colorado a quick cushion, then he connected for his eighth home run with a solo shot leading off the sixth. He also scored three runs after returning to the Rockies’ lineup from the 15-day disabled list.

Cuddyer, batting fifth and playing right field after missing time with an inflamed cervical disk, went 2-for-4 with three RBIs. Gonzalez homered leading off the eighth against Sandy Rosario, Gonzalez’s team-leading 12th clout.

The Rockies snapped a nine-game losing streak at AT&T Park with their first win since Aug. 10, 2012. San Francisco was shut out at home for the first time since that same game, also started and won by Chatwood.

Lincecum struck out eight and walked two over seven innings in his second consecutive start against Colorado and third in all this year.

The right-hander allowed four runs and seven hits after taking the loss against the Rockies at Coors Field last Saturday. He has defeats in four of his last five decisions. He has allowed 16 earned runs in his last 18 innings against the Rockies this season for an 8.00 earned-run average.

Chatwood allowed four hits in six scoreless innings, struck out four and walked one in another lopsided Rockies result against the reigning World Series champions. Colorado shut out San Francisco 5-0 in the series finale in Denver last Sunday.

The Rockies (27-21) remained in a first-place tie with Arizona atop the NL West standings after the Diamondbacks beat San Diego in Phoenix, with the Giants one game back.

San Francisco’s Marco Scutaro went 0-for-3 after having hit safely in each of his previous 15 games against Colorado, his former club before being traded to the Giants last July. But the Giants generated few opportunities against Chatwood and the Colorado bullpen.

Wilton Lopez, the Rockies’ third reliever, finished the five-hit shutout.

San Francisco failed to hit a home run for just the second time in its last nine home games.