DENVER -- San Francisco right-hander Matt Cain left in the second inning of Friday night's 5-2 loss to the Rockies with a strained right hamstring.
"Hopefully, we caught it early enough where it won't be a big deal," Cain said. "It's discouraging, but you can't sit here and dwell on it."
Cain will have an MRI on Saturday, manager Bruce Bochy said.
"I'm concerned," Bochy said, according to the San Francisco Chronicle. "It's a shame because he had his good stuff. That's a tough break for him, particularly with the way he's been throwing the ball, to have to miss a start or two. It's a little setback."
Cain appeared to be in some discomfort after throwing his 26th pitch of the game. He went 1 2/3 innings and allowed one hit.
Righty Albert Suarez took his place on the mound. Suarez took a grounder off his left leg in the third inning but remained in the game, giving up three runs over five innings.
Cain struggled early in the season but has turned things around. He was 1-1 with a 1.71 ERA over his previous three starts.
Before the game, Bochy credited Cain's resurgence to better rhythm and more confidence.
Information from The Associated Press was used in this report.