PHOENIX (AP) — The Colorado Rockies appeared well on their way to a sweep and a solid road trip.
Once their bats went quiet and Arizona strung together a couple of two-out hits, the trip home won't feel quite as good.
Colorado had three hits after the third inning and Rex Brothers struggled to put hitters away during Arizona's tying rally in the ninth, leading to a 5-4, 10-inning loss to the Diamondbacks on Wednesday night.
Arizona tied it in the ninth on Martin Prado's two-run single in the ninth inning and ended a four-game losing streak when Miguel Montero led off the 10th with his first walkoff homer.
"We had the game in control it looked like for most of the game, so it was a tough one to lose," Rockies manager Walt Weiss said. "It is always tough when you don't put games away."
Stuck in a rut, Arizona appeared to be in trouble after Colorado went up 4-0 after three innings on Carlos Gonzalez's two-run homer and pitcher Jordan Lyles' leadoff shot in the third.
It took some time, but the Diamondbacks worked their way back into it.
After struggling early, Josh Collmenter quieted the Rockies' bats over his final four innings and Trevor Cahill did the same while getting six outs.
Paul Goldscmidt gave Arizona's offense a little life in the eighth inning, hitting a solo homer off Adam Ottavino.
In the ninth, the Diamondbacks strung together a string of two-strike hits to load the bases against Brothers, and Prado tied it at 4 with a two-run single up the middle.
Addison Reed (1-2) kept the Rockies in check by stranding a runner at third in the 10th inning and Montero, after a couple of misses, ended it with his first career walkoff hit, a towering homer to right off Tommy Kahnle (2-1).
Montero was mobbed as he crossed the plate and was treated to a dirt bath — an Arizona walkoff tradition — that was a nice release for a team that had won two of its first 13 games at Chase Field.
"We needed that," Arizona manager Kirk Gibson said. "It was good that the guys hung in there."
The Rockies certainly didn't want to end their six-game road trip this way.
Colorado won four of the first give games and appeared to be in control after Lyles pitched six effective innings.
But the Rockies lost the lead after Brothers struggled to put away hitters and the game when Montero hit a 1-2 fastball over the wall.
Nolan Arenado extended his majors-best hitting streak to 20 games with a single in the sixth inning for Colorado, which had three hits after the third inning.
"It was Rex's game and Rex closed out many games," Weiss said. "I have all the confidence in world in Rex closing out games. He didn't get it tonight."
The Rockies beat up on Arizona's pitching the first two games of the series, with 13 runs and 23 hits, including 12 for extra bases.
They kept it up early against Collmenter — with a little help from the right-hander.
Gonzalez got it going in the first inning, eking a two-run homer just over the wall in the right.
Collmenter had a wild pitch to advance Jordan Pacheco to third in the second inning, but got a break when he was called out on appeal for leaving the base too early on a fly to right.
Lyles led off the third with his first homer on Sept. 30, 2012, with the Astros at Milwaukee, and Collmenter followed with another wild pitch that scored Charlie Blackmon to put Colorado up 4-0.
Collmenter settled in after that, retiring 10 straight batters until Arenado's two-out single in the sixth inning.
Collmenter allowed four runs on seven hits in seven innings.
"He really started getting the ball down, locating better, getting his curveball down," Gibson said. "He was much more effective and to throw seven innings like that was really what we needed."
That kept the Diamondbacks in it, but they couldn't get much going against Lyles.
Prado hit a one-out triple off Lyles in the first inning, but was thrown out at the plate trying to score on a grounder by Goldschmidt.
Arizona loaded the bases against Lyles in the sixth, scoring just one run, on Aaron Hill's groundout. The Diamondbacks struggled in a similar situation the night before, failing to score with the bases loaded and no outs in a 5-4 loss to the Rockies.
Unlike the night before, Arizona found a way to win it when Brothers couldn't put hitters away, particularly Prado, who's tying hit came with two strikes.
"One pitch away from that game being in the books. No doubt about it," Brothers said. "I didn't execute. Bottom line. I didn't execute a pitch."
NOTES: Arizona's starters have allowed 28 homers, most in the majors. ... Colorado's Justin Morneau went 0 for 4 to end a 13-game hitting streak. ... The Diamondbacks have Thursday off before starting a three-game road series against San Diego with RHP Bronson Arroyo on the mound. ... RHP Juan Nicasio pitches for Colorado against the New York Mets on Thursday to start a six-game homestand.