PHOENIX (AP) — Tyler Matzek was rolling along, preventing the opposing team from scoring much, just as he almost always seems to do.

But as he let loose his first pitch of the sixth inning, the Colorado right-hander's left hamstring tightened up, sending him out of the game.

He'll be fine — it's nothing more than a cramp — but having to leave when he was pitching so well was tough to take.

"I felt very comfortable and that's the disappointing thing," Matzek said after the Rockies held off the Arizona Diamondbacks 5-4 Monday night. "I felt like I could go deep in the game and help our bullpen out and something stupid like this preventing me is disappointing."

The Rockies got off to a great start, going up three runs before Matzek even took the mound on Justin Morneau's three-run homer off Chase Anderson (0-1).

Matzek (2-0) pitched well, holding the Diamondbacks to two runs on five hits in five innings.

Colorado hit throughout the game, too, finishing with 11 — three by Corey Dickerson, who also drove in a run.

But the finish was not easy.

Matzek left in the sixth inning after his leg cramped up. Arizona whittled away at the lead, scoring two runs in the fifth inning, one each in the sixth and eighth to cut the lead to one.

John Axford, getting the call after closer Adam Ottavino went on the disabled list earlier in the day, had to scrape his way through the ninth after giving up a pair of hits.

Axford managed to get through it, though, stranding the tying run at third for his third save and the Rockies' seventh win in 10 games.

"We made a little tough on ourselves, but wins in this league are gold and wins on the road are even more gold," Rockies manager Walt Weiss said.

Matzek was scheduled to start Sunday against San Francisco, but had it pushed back a day after the game was rained out.

The right-hander got into a little trouble in the fifth inning after walking the leadoff batter and giving up a single to Nick Ahmed. Ender Inciarte followed with an RBI groundout to end Arizona's 20-inning scoreless streak and A.J. Pollock cut Colorado's lead to 4-2 with a run-scoring infield single.

Matzek came out for the next inning, but signaled to the bench after throwing one pitch and left with what the team said was a hamstring cramp.

"I just didn't to push it," said Matzek, who's expected to make his next start.

Tuffy Gosewich had a run-scoring groundout off Brooks Brown after Matzek left, but Morneau saved a run with a diving stop on a hard-hit ball by pinch-hitter David Peralta.

Arizona pulled within 5-4 in the eighth on a fielding error by shortstop Troy Tulowitzki at shortstop on a groundball by Gosewich, but couldn't come through in the ninth after getting runners on the corners.

"We have not been able to swing the bats well, period — especially with men in scoring position," said Diamondbacks manager Chip Hale, whose team has lost four straight. ".''

Anderson had set a team record by lasting at least five innings in his first 14 home starts.

The streak appeared to be in jeopardy early.

Anderson gave up a single to Corey Dickerson, then Tulowitzki fouled off several pitches during a 13-pitch at-bat to work a walk. Two pitches later, Morneau hit a three-run homer just over the wall in right, his second of the season.

Dickerson a run-scoring single in the second inning and Nolan Arenado chased Anderson with a sacrifice fly in the sixth that put the Rockies up 5-2.

Anderson allowed five runs on eight hits in 5 1-3 innings.

"You want to get off to a good start and give your team a chance to win," Anderson said. "I didn't feel that I did that today."

NUMBERS

Colorado has won five straight and seven of nine against Arizona. ... Paul Goldschmidt had three hits to extend his hitting streak to 12 games against the Rockies. ... Tulowitzki has reached base safely in 16 straight games against Arizona. ... Arizona's Brad Ziegler has nine straight scoreless appearances — spanning 8 1-3 innings — to start the season.

UP NEXT

Rockies: RHP Kyle Kendrick, who will start against Arizona on Tuesday, is 1-2 with a 5.36 ERA in nine career appearances against the Diamondbacks.

Diamondbacks: Rookie RHP Archie Bradley will make his fourth start of the season against Colorado after facing opening day starters his first three outings: the Dodgers Clayton Kershaw, San Francisco's Madison Bumgarner and Texas' Yovani Gallardo.

TRAINER'S ROOM

Rockies: Weiss said he will start off with Axford as closer after Ottavino went on the 15-day DL with an inflamed right triceps, but also could use Rafael Betancourt in save situations.