DENVER — Getting off to a quick start, at the plate and on the mound, has fueled the Arizona Diamondbacks’ late season surge.

Patrick Corbin pitched effectively into the sixth inning, J.D. Martinez hit a three-run home run in the first inning and the Arizona Diamondbacks went on to win their season-high ninth straight, beating the Colorado Rockies 6-2 on Saturday night.

“We talked about playing downhill baseball from Day 1 here,” Diamondbacks manager Torey Lovullo said. “We’re executing, we are doing the things we are supposed to do to score runs, and then the pitchers deserve as much credit as anybody because they’re going ahead and executing shutdown innings.”

Arizona stretched its streak of scoring at least one run in the first inning to five consecutive games, one shy of its season high, and according to Statcast, have had the lead in 52 consecutive innings, the longest such streak since the St. Louis Cardinals had a 53-inning run with a lead in 1963.

“It’s a good time to heat up again,” Corbin said. “I think pitching, our bullpen’s been really good, and offensively we’ve been scoring some runs. When all three are clicking, we’re very tough to beat.”

The Diamondbacks pushed their lead over Colorado for the top NL wild-card berth to 5 1/2 games. The Rockies, losers of three straight and four of their last five, clung to a 1 1/2-game lead over Milwaukee, which lost to Washington earlier, for the second wild card.

“We’re not quite pitching well enough and we’re not quite hitting well enough to break through,” Rockies manager Bud Black said. “We had a couple of chances to get a hit, to get closer; didn’t happen. Jon (Gray) hung in there but gave up three.”

Corbin (13-11) allowed two runs — one earned — and two hits in 5 1/3 innings while posting his second win during Arizona’s longest winning streak since also winning nine straight Aug. 23-31, 2011. He has won his last five starts overall with a 0.50 ERA in that span.

After walking Charlie Blackmon to start the game, Corbin retired nine straight batters before allowing his first hit when DJ LeMahieu tripled off the right-center field wall to lead off the fourth. LeMahieu scored on Mark Reynolds’ double-play grounder and Corbin escaped further damage when he induced Ian Desmond to pop out.

Extending a trend of strong starts, the Diamondbacks jumped on Rockies starter Jon Gray (6-4) for three first-inning runs, all coming on the home run by Martinez. It was his 30th homer of the season and 14th for the Diamondbacks, who acquired him in a July 18 trade with Detroit.

“I tried to go quick with another slider, make it look different and it didn’t have the action it was supposed to,” Gray said. “It kind of rode up in the zone. It’s kind of the worst way to start a game off.”

Martinez singled in the ninth off reliever Tyler Chatwood to drive in a fourth run with Arizona adding another run on a wild pitch by Chatwood that skipped into the Diamondbacks’ dugout.

The Diamondbacks added an unearned run in the sixth after third baseman Nolan Arenado bobbled Corbin’s sacrifice bunt, allowing him to reach and load the bases. One out later, Chris Herrmann scored from third on reliever Chris Rusin’s wild pitch.

Colorado pulled within two in its half of the sixth after Arenado’s line drive skipped off right fielder Martinez’s glove for a two-base error, allowing LeMahieu, aboard with a walk, to advance to third and come home on Reynolds’ groundout.

Gray allowed three runs and five hits in five innings in taking the loss for the first time in six starts at home this season. He struck out six and walked three.

ROSTER MOVE

Prior to the game, the Diamondbacks recalled RHP Jimmie Sherfy from Triple-A Reno. He has yet to be scored on in his two previous big league outings.

UP NEXT

Diamondbacks: RHP Zack Godley (6-7, 3.29 ERA) is making his fourth career appearance against the Rockies. He has gone 1-0 with 5.59 ERA in his three previous outings, including his only other start against Colorado.

Rockies: RHP German Marquez (10-5, 4.18 ERA) has gone 6-0 with a 3.24 ERA in his last nine starts at Coors Field.