ST. PETERSBURG, Fla. (AP) -- The way things have been going for Tampa Bay in close games, the Rays figured they were due a break. Maybe even two.
The New York Yankees more than obliged Tuesday night, letting a late lead slip away when some shoddy defense led to two runs that gave the Rays a 3-2 victory.
"We've played the same game three nights in a row. We happened to win this one," Tampa Bay manager Joe Maddon said after his team rallied to stop a three-game losing streak, including a 1-0, 16-inning loss to Boston and a 5-4 loss to New York, in which the Yankees overcame a three-run deficit to win on a bases-loaded, ninth-inning walk.
"Obviously, people are upset about the previous two and very happy tonight," Maddon added. "But you saw the same effort level. You saw the same kind of intensity. You saw the same great pitching."
The Rays stopped a six-game skid in games decided by one run. Maddon said his team's ability to continue to play hard kept it in a position to take advantage of the breaks Tuesday night.
"There's been so many things that have been just out of our reach or in the reach of the other team. That's just how this game goes," Maddon said. "And I'll tell you, it only comes back to you if you keep playing. If you don't keep playing, it just continues to work away from you."
Jeremy Hellickson (9-7) retired 13 of 15 batters after giving up a two-run homer to Robinson Cano in the third inning, helping the Rays stay close until their sputtering offense could finally break through against Bartolo Colon .
Robinson Chirinos and Sean Rodriguez singled, chasing Colon (6-6) with one out in the seventh. That's when things really went awry for New York.
Center fielder Curtis Granderson lost pinch-hitter Justin Ruggiano 's fly ball in the Tropicana Field roof for a single off Boone Logan that loaded the bases. It looked as though the Yankees might escape the jam when the next batter - pinch-hitter Elliot Johnson - hit a tailor-made, double-play grounder back to the mound, but the ball glanced off Logan's glove for an error that enabled the Rays to tie it at 2.
Rodriguez raced home from third for the go-ahead run on Johnny Damon 's sacrifice fly to shallow center. Granderson charged in to make a sliding catch, scrambled to his feet but threw wildly to the plate for another error.
"It's an unfortunate way to lose a ballgame," Yankees manager Joe Girardi said. "We kind of gave them the game. You're going to have physical errors and you're going to lose ballgames, obviously. It's going to happen. These guys are not going to be perfect. But you don't like these kind of losses."
Granderson said he lost the ball coming off the bat, picked it up and then lost sight of it again.
"When I finally found it, I was too deep. Just one of those things. It disappeared up there in the top of the roof. ... It blended in really well," he said. "It's always a little bit of an issue trying to pick it up and stay with it. By the time I found it, it was a little too late."
Logan was at a loss to explain his critical mistake.
"Well, there was nothing quirky about my error. I think you take that away, we're winning the game," the reliever said.
"I was so geared up to get him out, and I was more focused on making my pitch. When he hit it, it kind of caught me off guard," Logan said. "I think the hardest ball to catch would be the hopper over the pitcher's head like that. You really can't judge it well. You're so focused on the pitch. It throws you off a little bit."
Rebounding from allowing eight runs in two-thirds of an inning at Toronto in New York's first game after the All-Star break, Colon took a three-hitter into the seventh. He walked two and struck out a season-high nine.
Hellickson won his second straight start following a four-game losing streak, yielding two runs and five hits while walking one and striking out seven in seven innings. Jake McGee pitched a scoreless eighth and Joel Peralta worked a perfect ninth for his first save.
Cano's 16th homer ended a stretch of four consecutive games in which the Yankees failed to hit a home run, the club's longest streak this season.
Colon limited the Rays to one hit until Sam Fuld tripled to center with one out in the fifth and scored on Reid Brignac 's single to right. The 38-year-old right-hander gave up a single to B.J. Upton and walked two in the first three innings, but none of those runners advanced beyond first base.
Hellickson regrouped after Cano's homer to retire 12 in a row before Brett Gardner singled and Eduardo Nunez walked with two outs in the seventh. After a double steal, the rookie right-hander finished his night by getting Derek Jeter to ground out.
"They kept telling me we're going to get you the win," Hellickson said of the Rays' winning rally. "The Yankees helped us out a little bit, but we came up with some big hits when we needed them."
NOTES: The Rays optioned LHP Alex Torres to Triple-A Durham and recalled RHP Dane De La Rosa. In his major league debut on Monday night, Torres walked Russell Martin with the bases loaded in the ninth inning, forcing home the decisive run in a 5-4 New York victory. ... The Yankees placed RHP Sergio Mitre on the 15-day DL with right shoulder inflammation and recalled LHP Steve Garrison from Double-A Trenton. ... New York RHP Rafael Soriano (right elbow inflammation) allowed two runs and two hits over 1 1-3 innings in his first game with Class-A Tampa. INF Eric Chavez (broken left foot) was the DH in the same game. ... New York RHP Ivan Nova left a start at Triple-A Scranton/Wilkes-Barre because of an undisclosed injury.