DENVER — Matt Cain was nearly unhittable, though that couldn't keep the San Francisco Giants from continuing their recent slide.
Cain's best performance of the season was wasted, as he scattered three hits, allowed a run, struck out five, walked one and retired the last 20 batters he faced.
"What a great job he did, saved us in the second inning when we were throwing the ball all over the place," San Francisco manager Bruce Bochy said. "He picked us up and kept them from scoring again."
But Nolan Arenado hit a game-ending single with two outs in the ninth inning to lift the Colorado Rockies to a 2-1 victory over the Giants, losers of six straight for the first time in three years.
"It's not a good stretch," Bochy said. "I'll leave it at that."
Cain was reached for a single run with two outs in the first inning. Michael Cuddyer drove an 0-2 pitch into center field to drive in the run.
"I had a chance to get out of that in the first inning and didn't make a good pitch to Cuddyer," said Cain. "I could kick myself for that (0-2 curveball)."
The Rockies had missed a chance to extend their 1-0 lead in a mistake-filled bottom of the second.
With Yorvit Torrealba on first, Jorge De La Rosa laid down a bunt. Third baseman Pablo Sandoval's throw to second went into center field and Torrealba advanced to third. Center fielder Juan Perez's throw to third got by Sandoval, but Torrealba didn't score even though there was no Giants player covering home.
The oversight cost the Rockies when Torrealba was caught in a rundown on Corey Dickerson's groundout and DJ LeMahieu hit a fly to right to end the inning.
It was the last chance Colorado had against Cain, who showed his first two starts against Colorado this season were an aberration. In those games he allowed a combined eight runs and 12 hits in 11 1-3 innings.
"I started making pitches and started to get ahead of guys," said Cain. "I wasn't getting ahead of guys early."
Cuddyer singled in the first inning to extend his hitting streak to 26 games.
Todd Helton was walked by reliever Jeremy Affeldt (1-4) with two outs in the ninth for Colorado's first baserunner since the second inning.
Josh Rutledge ran for Helton, stole second and scored when Arenado singled up the middle on a 2-2 pitch to help the Rockies return to .500 at 41-41.
"It was a split-finger that he stayed on it," Affeldt said. "I didn't get it low enough and got beat."
Andres Torres had three hits and Buster Posey had two hits and an RBI for the defending World Series champion Giants, who last lost six in a row from June 26 to July 2, 2010.
Cuddyer's streak is the longest in Rockies' history and in the majors this season. He has reached base safely in a franchise-record 45 straight games.
He took the drama out of it early with an RBI single up the middle in the first that gave the Rockies a 1-0 lead.
Colorado starter Jorge De La Rosa made the one-run lead stand until the sixth, when he gave up three hits, including Posey's two-out, RBI double that tied the game at 1.
De La Rosa went to the mound at the start of the seventh inning but never faced a batter. After a few warmup pitches manager Walt Weiss and trainer Keith Dugger came to the mound and checked on the lefty. After a brief conversation De La Rosa was replaced by Wilton Lopez.
On Saturday, he allowed just one run on three hits and struck out five in eight innings.
NOTES: The Giants are 1-5 this season at Coors Field. ... Giants RHP Santiago Casilla will make a rehab start for Class-A San Jose on Sunday. Casilla had a bone cyst removed from his knee. ... San Francisco RHP Chad Gaudin (right elbow contusion) threw a bullpen session before Saturday's game. He is on schedule to return July 6. ... Posey has reached base safely in his last 47 games against the Rockies.