DENVER -- Vernon Wells homered and scored the winning run on an infield single in the ninth, and the New York Yankees beat the Colorado Rockies 3-2 on Wednesday night.
Wells finished with three hits and Mariano Rivera pitched the ninth for his 12th save.
Todd Helton homered for the Rockies.
Heavy rain 90 minutes before first pitch threatened to postpone the game, but precipitation held off through most of the game.
The moist air did wonders for the pitchers. The teams combined for seven hits in the first eight innings, but both had chances to break a 2-2 tie.
The Yankees finally did when they loaded the bases with one out in the ninth against Rafael Betancourt (1-1). He struck out Travis Hafner before Brennan Boesch came up. Boesch hit a hard grounder to third baseman Nolan Arenado and just beat the throw to first to allow Wells to score.
David Robertson (2-0) pitched the eighth to get the win.
Starter David Phelps was lifted for a pinch-hitter when Chris Nelson doubled to right-center and reached third on Dexter Fowler's second error in as many innings. Nelson was stranded when Ben Francisco grounded out sharply to third.
Phelps, who came in with a 5.02 ERA, allowed just two runs on three hits, walked one and struck out four in six innings.
The Rockies had an opportunity in the eighth when Troy Tulowitzki, out of the lineup with a swollen left adductor, pinch hit with one out. The first offering from Robertson skimmed off Tulowitzki's back and sent him to first.
Eric Young Jr. ran for him and stole second. Jonathan Herrera hit a laser right to second baseman Robinson Cano and Fowler grounded out to end the inning.
Colorado starter Juan Nicasio pitched well but was a victim of a high pitch count again. He threw 91 in five innings.
The Yankees made sure right away they weren't going to be shutout again. Brett Gardner led off the game with a single and stole second. One out later, Wells laced a fastball into the left-field bleachers to give New York a 2-0 lead.
The Rockies got it back in the second. With one out Wilin Rosario doubled to right-center and Helton followed with a home run to right to tie it. It was Helton's second home run of the season and his first at Coors Field since June 13, 2012, against Oakland.
Both pitchers settled down after giving up the homers. Phelps set down 10 of the next 11 and only allowed a walk to Fowler, who was erased on a double play.
Nicasio didn't allow a hit the rest of the way but left after five innings and 91 pitches. He surrendered just two hits and struck out five but didn't figure into the decision.
New York manager Joe Girardi used an unconventional lineup, hitting Phelps eighth and rookie catcher Austin Romine ninth. He moved Cano up to second in the order to avoid having three left-handers in a row batting.
NOTES: Yankees SS Eduardo Nunez took some ground balls and did some throwing before the game but still felt soreness in his ribs. He will likely sit the entire three-game series against Colorado. "He went out and tried to do some stuff and is not where he needs to be," Girardi said. ... Tulowitzki was out of the lineup for the second straight game with swelling in his left adductor tendon. Tulowitzki had hoped to play but manager Walt Weiss held him out due to the rainy conditions. ... The Rockies honored Yankees closer Rivera before the game, with Helton representing the team. ... Yankees RHP Ivan Nova (right triceps inflammation) pitched in an extended spring training game in Tampa, Fla., and felt good despite some control issues. He had four walks in four innings but Girardi said his velocity was good in 73 pitches. Nova could come off the 15-day disabled list for a doubleheader in Cleveland on Monday.