PHOENIX (AP) Pinch-hitter Phil Gosselin singled in the winning run after Colorado reliever Brooks Brown walked the bases loaded in the 11th inning as the Arizona Diamondbacks beat the Rockies 4-3 Tuesday night.

Gosselin knocked in Paul Goldschmidt from third base with one out after Brown (1-3), the eighth of nine pitchers for the Rockies on the night, walked the three batters he faced in the inning. A.J. Pollock, Goldschmidt and David Peralta reached base after Brown threw 11 straight balls.

Christian Friedrich gave up the winning hit after getting a fielder's choice from Welington Castillo.

More from FoxSports

Randall Delgado (7-4) pitched a scoreless top of the 11th.

Jose Reyes had three hits, and Carlos Gonzalez homered for the Rockies.

The Rockies got two runs on three singles, an error and a sacrifice fly in the first inning. Charlie Blackmon, Reyes and Gonzalez singled in consecutive order, with Gonzalez driving in Blackmon and a missed cutoff man by left fielder Peralta allowing Reyes to reach third base.

Nolan Arenado drove in Reyes with a fly ball for his major-league leading 127th RBI.

The Diamondbacks made it 2-1 in the bottom of the first on Goldschmidt's two-out single to drive in Pollock.

Gonzalez's towering home run to right in the third was his 40th of the season, giving the Rockies multiple 40-home run hitters - Arenado has 41 - in a single season for the first time since Vinny Castilla, Larry Walker and Andres Galarraga accomplished the feat in 1997. It gave Colorado a 3-1 lead.

A pair of triples, one in the bottom of the third and another in the fourth, helped the Diamondbacks tie the score at 3. Ender Inciarte tripled and scored in the third, and Peralta tripled and came home on Jake Lamb's sacrifice fly in the fourth.

Christian Bergman started for Colorado and left with a no-decision after five innings having allowed three runs on five hits. Robbie Ray went six innings for Arizona, allowing two earned runs on seven hits.

TRAINER'S ROOM

ROCKIES: Reyes was back in the lineup for the first time since Sept. 23. He missed the past several days with a left Achilles injury. . Gonzalez had to be checked by a trainer after slipping and falling on his left side going after Inciarte's triple near the right field fence, but he stayed in the game.

DIAMONDBACKS: SS Nick Ahmed is likely out for the remainder of the season with a back injury.

UP NEXT

ROCKIES: Right-hander Chad Bettis (8-5, 3.95) goes Wednesday and hasn't fared well against the Diamondbacks in his career, holding a 10.80 ERA (8 1-3 innings, 10 earned runs) in four games with one start against them.

DIAMONDBACKS: Right-hander Chase Anderson - who has a career high in starts with 26, innings with 147 1-3 and strikeouts with 107 - is scheduled to start Wednesday against Colorado. Anderson is 6-6 with a 4.40 ERA.