After being swept by the Baltimore Orioles last week, the Tampa Bay Rays were left for dead. The team sat four games behind in the division with only two weeks of baseball left to play before starting a three-game series against the Yankees.

By winning 6-4 on Friday night at Yankee Stadium, the Rays revived their season and closed the gap in the division to just three games.

Facing off against Yankee ace CC Sabathia, Rays pitcher David Price pitched a superb game, throwing seven innings, allowing two runs and striking out six. He earned his MLB-best 18th win and only gave up five hits to the Yankees.

"That was a big game for us, facing CC and that lineup," Price told the Associated Press. "We were up to the task."

Price hadn't started a game since Sept. 2 and improved to 7-3 against the Yankees.

New York took an early lead against Price, scoring on a first-inning single, but gave it up in the fifth. CC Sabathia had been sharp throughout the game, but gave up a lead off double, threw a wild pitch and walked Carlos Pena to put runners on with no outs.

Elliot Johnson hit an RBI single before Desmond Jennings added another hit to take a 3-2 lead.

"I still believe in CC," Yankees manager Joe Girardi said. "There's a guy that's done so many special things for us here. So I still believe in him."

The Yankees pulled closer on a home run in the fifth by Curtis Granderson, but quickly gave runs back, with the Rays scoring one run in the seventh and another in the eighth by B.J. Upton to go up 5-2.

In the fifth the Yankees had a chance to put a runner on second after Eduardo Nunez smashed a grounder down the third base line, but it hit umpire Jerry Meals as he tried to get out of the way.

"I said to home plate umpire Scott Barry, 'That might be the best play he made in his life,'" Rays catcher Chris Gimenez said. "It was much needed after the series we just had."

Following the play, shortstop Derek Jeter added another hit to pass Willie Mays on the all-time hit list. He now has 3,284 on his career.

Jeter was in the lineup at designated hitter due to a sore ankle. His sure-handed glove was missed by the Yankees, who gave up an extra run in the ninth after Nunez let a routine ground ball roll through his legs and into the field.

In the eighth inning the Yankees cut the lead to 5-4 on a home from Alex Rodriguez off Joel Peralta, who then walked Robinson Cano, before Maddon brought in closer Fernando Rodney for a five-out save.

Rodney struck out Russell Martin and gave up a walk to Raul Ibanez to give the Yankees a chance to tie up the game. But Curtis Granderson swung on the first pitch Rodney threw to him and grounded out to first base to end the inning.

Rodney closed out the game in the ninth for his 43rd save and has only blown two on the season. He also leads the league in reliever ERA at 0.66.

The loss gave the Orioles, who were playing in Oakland, the chance to take sole possession of first place over the Yankees. But Baltimore lost 3-2 to stay in a first place tie for another day.

On the bright side for the Yankees, they will get both Ivan Nova and Andy Pettitte back from injuries, which should help strengthen a pitching staff that has struggled for a month.

Nova will start on Saturday against Tampa's James Shields, while Pettite will make his first start since June against Toronto.