Updated

Colorado Rockies starter Jhoulys Chacin didn't end the season with a win but, more importantly, he finished healthy.

Chacin scattered three hits over five scoreless innings in the Rockies' 5-3 loss to the Arizona Diamondbacks on Tuesday night.

He's pitched really well in his final nine starts going 3-2 with a 2.84 ERA. Chacin spent time on the disabled list with inflammation in his right shoulder after a dismal start to the season.

"I need to be healthy," said Chacin, who is planning to play winter ball in his native Venezuela. "I feel good right now and I feel I can get back and throw how I used to last year. I want to feel comfortable and get all my strength back. Baseball is difficult when you are 100 percent. Whenever you're not 100 percent, it is much more difficult. I need my health back."

Chacin finished 3-5 with a 4.43 ERA in 14 starts and 69 innings after missing more than three months with right shoulder inflammation.

"I felt really fresh and that's a good sign," Chacin said.

Rockies manager Jim Tracy is equally pleased with Chacin's finishing stretch.

"For Jhoulys Chacin to finish up in the matter which he did you have to be extremely encouraged by that," Tracy said.

Closer Rafael Betancourt's finish was a decidedly different matter. For the second time in as many nights, Betancourt took the mound in the ninth with the lead and couldn't convert the save.

"We got walked off," Tracy said. "That is simply what it boils down to."

Hill's second career walkoff home run and first since 2006 assured the Diamondbacks of a non-losing season. A win on Wednesday would give the Diamondbacks an 82-80 record and consecutive winning seasons for the first time since 2007-08.

John McDonald hit a one-out single to left off Betancourt (1-4) and Gerardo Parra singled to left one out later. Hill then drove the first pitch he saw into the left-field stands for his 26th home run of the season.

Brad Ziegler (6-1) pitched the ninth for the victory.

It was the second blown save in as many nights for Betancourt.

"You've got your closer out there and you've worked the game to the point where you go to the eighth inning with the lead," Tracy said. "(Rex) Brothers did a terrific job (in the eighth) and if they are going to beat us, they have to beat those people. They got our closer."

McDonald hit a two-run home run off Guillermo Moscoso in the seventh to give the Diamondbacks a 2-1 lead.

But Colorado came right back in the eighth.

Josh Rutledge led off with a single to left off David Hernandez. Tyler Colvin doubled to left and Pacheco lined the first pitch he saw down the left-field line, scoring both runners for the 3-2 lead.

Arizona starter Patrick Corbin pitched into trouble only once and it translated into the Rockies' first run of the game.

Andrew Brown led off the second with a single and advanced to third when Parra bobbled DJ LeMahieu's single to center. Corbin induced Charlie Blackmon to ground into a double play, allowing Brown to score for the 1-0 lead.

After Jonathan Herrera followed the double play with a double to left, Corbin settled down to retire 12 straight hitters and 16 of the final 19 he faced.

Corbin went seven innings and allowed one run on six hits. The rookie left-hander struck out six and issued an intentional walk.

The Diamondbacks took their first lead in the seventh. Jason Kubel doubled off the base of the right-field. Chris Johnson grounded out to third but McDonald followed with a towering home run into the back of the Diamondbacks' left-field bullpen for his sixth home run, matching a career high set in 2010.

NOTES: Kubel's double made him the seventh player in franchise history to hit 30 home runs and 30 doubles. ... Corbin has allowed only three unintentional walks in his past six starts spanning 26 1/3 innings. ... The Rockies came into the game with only four of seven players on the bench healthy enough to play. ... Diamondbacks C Miguel Montero singled in the fourth for his career high 139th hit of the season. ... RHP Ian Kennedy (15-11) closes out the season for the Diamondbacks on Wednesday against Rockies LHP Jeff Francis (5-6). Kennedy is 4-0 with a 3.00 ERA in his past six starts but walked six batters, the second-most of his career, in his last start Friday against Chicago. Francis is 8-7 in 23 career starts versus the Diamondbacks.