Updated

Pinch hitter Brennan Boesch's dash down the first base line ended with a safe call. The Rockies didn't quite see it that way.

Boesch beat out an infield single with the bases loaded in the ninth off closer Rafael Betancourt and the New York Yankees snapped a five-game skid at Coors Field with a 3-2 win over the Colorado Rockies on Wednesday night.

"Felt like he was out," Rockies first baseman Todd Helton said. "I don't know what the replay showed. It was close. Yeah, it's a tough call. It's a shame the game had to be decided on a call like that. But got to give them credit for being in that situation in the first place."

Vernon Wells had a two-run homer in the first and singled to start the ninth. He stole second, was sacrificed to third and broke for the plate to score the decisive run when third baseman Nolan Arenado couldn't throw out a hustling Boesch after a diving stop.

"I know it was close," Arenado said. "I didn't get the ball out in time. I think, from what everyone is saying, he was out. Obviously, if I get the ball out a little quicker, he's out."

Rockies manager Walt Weiss said first base umpire Phil Cuzzi told him that he thought Boesch beat the throw.

"It was a close play. I thought he was out. Close play," Weiss said.

David Robertson (2-0) earned the win by working out of a jam in the eighth and Mariano Rivera pitched the ninth for his 12th save in 12 chances.

It's the first time New York has won in the Mile High City since June, 19, 2002. The Yankees also bounced back from a 2-0 loss the night before. They're now 29-9 in games following a shutout loss since manager Joe Girardi's arrival in 2008.

Wells began the ninth with a single off Betancourt (1-1) and was credited with a stolen base when shortstop Jonathan Herrera dropped the ball while applying the tag. Lyle Overbay drew a walk and Ichiro Suzuki sacrificed them over.

After an intentional walk to Jayson Nix to load the bases, pinch-hitter Travis Hafner struck out. Boesch sent a sharp two-out grounder to Arenado, who fielded it cleanly and came up throwing. Helton thought Boesch was out and began heading to the dugout, but first base umpire Phil Cuzzi ruled him safe. Weiss briefly argued, before returning to the dugout.

With their bench depleted, the Yankees had to get creative in the field for the ninth. So much so that Wells wound up playing third base for the first time in his career. He fielded Carlos Gonzalez's slow hopper for the second out.

Rivera then got Wilin Rosario to fly out to center to end the game.

The wind blowing in on a cool and damp night meant very little hitting for either team, just 10 combined hits. The only early offense was a pair of two-run homers, one by Wells on a 94 mph fastball from Juan Nicasio in the first and the other a drive by Helton in the second.

Chris Nelson's first hit with the Yankees came in the stadium that's quite familiar to him. Nelson, who was traded from Colorado to New York on May 1, snapped an 0-for-12 skid with a single in the seventh that Fowler misplayed and allowed Nelson to hustle to third. With two outs, pinch hitter Ben Francisco grounded out to third and stranded Nelson.

David Phelps was solid except the one hiccup to Helton. He lasted six innings and allowed three hits.

Nicasio went five innings in the no-decision, striking out five and walking one.

Girardi employed an unusual strategy Wednesday, inserting pitcher David Phelps into the No. 8 spot in the batting order and moving catcher Austin Romine to ninth. Girardi borrowed the idea from former St. Louis skipper from Tony La Russa.

Girardi's tactic was a way to gain more favorable matchups deeper in the game against the Rockies' bullpen. It's the first time a Yankees pitcher has batted in a spot other than ninth since interleague play began in 1997, according to STATS.

The last Yankees pitcher to bat eighth was Don Larsen in 1957, STATS said.

Weiss decided to hold out Troy Tulowitzki for a second straight game. Not so much because of soreness in his legs as the soggy weather. Weiss didn't want to take a risk with his All-Star slugger.

Tulowitzki appeared as a pinch hitter in the eighth and was hit in the back by a pitch from Robertson. He exited for a pinch runner.

"He's fine," Weiss said. "Curveball, just got him I think part of his helmet and might have hit his neck a little bit. Didn't hit him square."

NOTES: Before the game, the Rockies presented Yankees Rivera with a $5,000 check for his foundation. ... The Yankees will send LHP CC Sabathia (4-3) to the mound Thursday in the series finale. The Rockies will counter with LHP Jeff Francis (1-2).