Updated

Wilin Rosario drove in the game-winning run in the bottom of the 10th inning to lift the Colorado Rockies past the Arizona Diamondbacks, 5-4, in the middle test of a three-game set at Coors Field.

Carlos Gonzalez hit a one-out double and the D-Backs intentionally walked Troy Tulowitzki to get to Rosario, who made them pay with a base hit to right field that scored Gonzalez easily.

"Wilin had a great approach there. I looked like he was approaching the big part of the field and really hit the ball hard the other way," said Rockies manager Walt Weiss.

Rosario finished the game with two hits and also scored a run and DJ LeMahieu went 3-for-4 with two doubles and a pair of RBI for the Rockies, winners in four of their last five games.

Wilton Lopez (1-1) pitched a perfect top of the 10th to earn the win. Starter Jhoulys Chacin gave up four runs -- three earned -- on three hits and three walks over 6 1/3 innings.

Jason Kubel and Martin Prado both drove in a pair of runs for Arizona, which lost for just the second time in seven games.

Matt Reynolds (0-2) gave up the deciding run to absorb the loss.

Starter Ian Kennedy was tagged for four runs -- three earned -- on seven hits while striking out six over six frames.

"The biggest thing for Ian was he gave up four two-out hits. They got four runs off it. He kept us in the game, our bullpen just couldn't hold it," Arizona manager Kirk Gibson said.

Colorado jumped out to a 2-0 lead in the second inning. Tulowitzki doubled and Rosario singled to put runners on the corners with no outs. After Jordan Pacheco popped out, Nolan Arenado ripped a base hit to right field to push Tulowitzki across. LeMahieu followed with a base hit to left to plate Rosario.

Tulowitzki's homer in the third put Colorado up 3-0 and LeMaiehu's RBI double in fourth gave the hosts a four-run lead.

The Diamondback's tied the game with a four-run seventh inning. Paul Goldschmidt walked, Eric Chavez reached on a Pacheco fielding error and Cody Ross walked to load the bases with one out. Kubel crushed a double to left field to score Goldschmidt and Chavez and Prado followed with a single to clear the bases.

Miguel Montero singled and Josh Wilson walked to load the bases once again, but reliever Josh Outman struck out Gerardo Parra and Didi Gregorius to end the threat.

The Rockies had a chance to end the game in the ninth after LeMahieu doubled and pinch-runner Eric Young moved to third on Todd Helton's ground out, but Dexter Fowler flew out to center to force extras.

Game Notes

Colorado was 5-for-11 with runners in scoring position ... Tulowitzki extended his hitting streak to eight games ... Rockies reliever Rex Brothers extended his scoreless winning streak to 17 innings after pitching a shutout ninth ... Arizona is 6-2 in extra-inning games this season ... Chavez has hit safely in 10 of his last 12 games.