Matt Cain hurts hamstring in Giants’ loss to Rockies

DENVER — Matt Cain finally got his arm back in order. He finally was pitching like it was 2012 again.

His best groove in years, however, was detoured Friday night at Coors Field when he walked off the mound in the second inning with a strained right hamstring.

The Giants fell 5-2 to the Rockies, and manager Bruce Bochy hinted afterward that Cain could go on the disabled list. More will be known after the pitcher has an MRI exam Saturday.

“It’s discouraging,” Cain said, “but I can’t sit here and dwell on it. We’ll try to get this thing right and get back out there.”

Cain retired five of his six batters and pulled the hamstring on his 25th pitch. He threw one more and retired Gerardo Parra, who flied to right field. Cain skipped off the mound, glanced in the Giants’ dugout and shook his head knowing he was done.

“The last pitch felt the same. I was hoping it would release and not be a big deal,” Cain said. “It got tighter and tighter. By the time I got up here, it was tight enough to where if I stayed out there, I would’ve made it worse.”

Cain had a 1.71 ERA his previous three starts after posting a 7.84 ERA his first six. He was replaced by Albert Suarez, who saved the bullpen in the opener of a 10-game trip by pitching five innings. According to Bochy, he could move into the rotation if Cain goes on the DL.

Chris Heston, who threw six shutout innings for Triple-A Sacramento on Thursday, also could be an option.

San Francisco Giants starting pitcher Matt Cain, back, confers with catcher Trevor Brown while facing Colorado Rockies' Nolan Arenado in the first inning of a baseball game Friday, May 27, 2016, in Denver. (AP Photo/David Zalubowski) less San Francisco Giants starting pitcher Matt Cain, back, confers with catcher Trevor Brown while facing Colorado Rockies' Nolan Arenado in the first inning of a baseball game Friday, May 27, 2016, in Denver. (AP ... more Photo: David Zalubowski, Associated Press Photo: David Zalubowski, Associated Press Image 1 of / 1 Caption Close Matt Cain hurts hamstring in Giants’ loss to Rockies 1 / 1 Back to Gallery

“He did a tremendous job,” Cain said of Suarez. “That’s not easy. We’ve been doing a pretty good job on the starting side being able to go deep into games. All of a sudden, in the second inning, he’s got to hop up real quick. To be able to come in out of the ordinary, he did a tremendous job, especially when we’re starting a series in Colorado. That’s a big thing, a big asset to have.”

It wasn’t the first time Cain strained his right hamstring at Coors Field. It happened in May 2014 in a 5-1 Giants victory, a day Santiago Casilla also pulled a hamstring. Cain went on the DL afterward, one of his three DL stints that season. He had elbow surgery in August.

Cain said the latest strain is higher in the leg.

“I’m concerned,” Bochy said. “I think it is similar. I don’t know what it is about Colorado with these hamstrings. 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, if he has to miss a start or two. It’s a little setback.”

The Giants entered the trip with 13 wins in 14 games, a 10-game win streak against National League West opponents and a seven-game road win streak.

They had seven hits, including a ninth-inning triple by Buster Posey followed by Gregor Blanco’s RBI single. Their first run was unearned, coming on Suarez’s fielder’s choice in the third.

Jarrett Parker reached on an error and advanced to third on Trevor Brown’s single. Suarez hit a comebacker to Tyler Chatwood, who forced Brown at second, and shortstop Trevor Story threw home. At first, Parker was called out at the plate, but a replay review showed he was safe.

The Rockies answered in the home half of the inning with RBI doubles by Charlie Blackmon and Nolan Arenado. Story knocked in two runs with a double in the fourth and single in the two-run eighth. George Kontos was charged with both eighth-inning runs.

The game started 42 minutes late because of a weather delay, though the field was never unplayable. The storm that was expected never arrived.

John Shea is a San Francisco Chronicle staff writer. Email: jshea@sfchronicle.com Twitter: JohnSheaHey