DENVER — Justin Upton lost the grip on his bat in the eighth inning and sent it spinning into the stands.

Usually, he might have let the lucky fan keep it as a souvenir. Only Upton's down to just a handful of bats after breaking quite a few on this road swing, so he had this one retrieved.

Upton put it to good use, too, hitting a two-out, two-run shot off closer Rafael Betancourt in the ninth inning to help the Arizona Diamondbacks beat the Colorado Rockies 9-7 on Thursday.

Upton sent a 93 mph fastball from Betancourt (1-1) over the right field fence for his first homer in two weeks.

"That was nice," Upton said. "Just being able to put all my struggles aside and come up big for the team. That's always a goal, but it's not always that easy. When you can get it done, it definitely feels good."

His big hit was just part of the story. Upton also made a sliding catch to end the eighth and keep the game tied.

Any connection between the catch and the homer?

"It shows up a lot that way," Upton said. "A guy makes a good play and comes in and starts off an inning with a hit. It happens that way, but I don't know if you necessarily mentally bring it with you (to the plate). It definitely makes you feel good, that you can stop some runs from scoring. It kind of puts you in a good mood."

These days, good moods — and swings — have been hard to come by for the All-Star outfielder. Upton entered the game hitting just .163 over his last 13 games. Not only that, but his average was even lower (.111) with runners in scoring position.

That's not like Upton, who had a monster season in 2011 when he hit .289 with 31 homers and 88 RBIs.

With one swing, he felt more like himself.

"I was yelling at it to get up and it carried for me, which is nice," Upton said.

Willie Bloomquist and Ryan Roberts also drove in two runs apiece as the Diamondbacks won for the third time in 12 contests.

J.J. Putz escaped a bases-loaded jam in the ninth by getting Ramon Hernandez to hit into a game-ending 5-4-3 double play for his seventh save in nine chances.

The buzz surrounding this game, though, centered on the bees that invaded the stadium, taking over a camera bay next to the Rockies' dugout in the fifth inning and temporarily halting the game. They remained stuck to a railing until a beekeeper arrived an inning later to vacuum up the bees and relocate them.

"I'm not scared of bees," Carlos Gonzalez said.

Lately, Coors Field has resembled "Wild Kingdom," with a squirrel scampering into the outfield grass the night before.

Troy Tulowitzki hit a two-run homer off starter Trevor Cahill and Jordan Pacheco added a solo shot to help stake the Rockies to an early 4-1 lead.

But it wouldn't last. Bloomquist ignited a four-run eighth with an RBI single off Rex Brothers. Jason Kubel, Paul Goldschmidt and Roberts also added run-scoring singles.

The three-run cushion wouldn't be enough as David Hernandez was roughed up in the eighth. He loaded the bases and then walked Dexter Fowler to bring in a run. Michael Cuddyer sent a chopper to Roberts, who booted the grounder to allow another run to score.

With the bases still full, Marco Scutaro drew another walk to tie the game at 7.

Brad Ziegler (2-1) relieved Hernandez and promptly gave up a sinking liner to pinch-hitter Wilin Rosario. But Upton made a sliding catch in right to quell the threat.

Gerardo Parra had a one-out double in the ninth and stole third. After Betancourt struck out Bloomquist, Upton drilled his fourth homer of the season.

"He's worked hard and he was rewarded today," Diamondbacks manager Kirk Gibson said.

Putz started out the ninth in rocky fashion, giving up singles to Gonzalez, Tulowitzki and Todd Helton. The Rockies then sent pitcher Alex White to the plate to pinch hit for Betancourt — with no intention of swinging.

"We're not going to let him hit into a double play and wipe the inning out," Rockies manager Jim Tracy said.

Instead, White took a called third strike on a 3-2 count.

"It was terrible. I was doing what I had to do to try to help the team, but obviously I wanted to swing there," White said.

Hernandez then hit a weak grounder to Roberts to end the game.

"Not the way you draw it up, but made a big pitch when I needed to," Putz said.

Rockies starter Juan Nicasio had a scare in the first inning when Bloomquist sent a liner straight at him. Nicasio turned his back just in time and was struck on the right thigh.

The play was eerily reminiscent of the line drive that hit Nicasio in the right temple last August, when he suffered a fractured skull along with a neck injury. Doctors had to perform emergency surgery to insert pins into the cracked C-1 vertebra and attach a small metal plate to the back of his neck.

Nicasio made a remarkable recovery to become one of the Rockies' most reliable pitchers this season.

That hit, though, caught him good.

"I can pitch, but I couldn't stay back," said Nicasio, who gave up one run in 4 2-3 innings. "I couldn't push off — I was only throwing with my arm and my shoulder.

"It will be all right. I won't miss a start," he said.

NOTES: Arizona OF Chris Young (shoulder) could be available as soon as this weekend for interleague play in Kansas City. ... The Rockies host the Seattle Mariners on Friday night, with White (0-2) facing RHP Kevin Millwood (1-4). ... The Rockies issued nine walks against Arizona.