Miguel Montero hit a home run off Tommy Kahnle for his first career walkoff hit as the Diamondbacks rallied from a 4-0 deficit Wednesday night to avert a three-game sweep at the hands of the Rockies in front of 19,135 at Chase Field.

"It feels awesome," Montero said on the field after being mobbed by his teammates at home plate. "It was a fastball. … I put a good swing on it."

Montero's third homer of the season snapped Arizona's four-game losing streak and, perhaps for at least a day, cooled some of the speculation surrounding the fates of manager Kirk Gibson and General Manager Kevin Towers.

"It's great. We needed that. The guys hung in there," Gibson said.

Martin Prado tied the game in the ninth with his third hit of the night, a two-out, two-run single up the middle off Rex Brothers.

"He's swinging the bat much better and he's much more relaxed, not so hard on himself," Gibson said of Prado, who is hitting .400 (8 for 20) over his past six games.