ST. PETERSBURG -- Greg Golson had entered the game as a Yankees defensive replacement, and now he was flat-footed trying to track a fly ball through the oatmeal-colored roof at Tropicana Field, picking up these faint words from a teammate: "He's tagging!"

With just 21 games of experience, Golson may still be a relative unknown in the big leagues, but playing with the American League East lead on the line provides a pretty good chance to be discovered.

Golson's accurate, strong throw to third base cut down Carl Crawford for the final out Tuesday as the Yankees defeated the Rays, 8-7, in 10 innings, reclaiming a half-game advantage in the division as the rivals slug it out in a September to remember.

"I was just trying to put a good throw on the ball," said Golson, who had entered the game in the ninth inning. "Everyone was running out to right field, and that usually doesn't happen. People don't run out to right field. I'm just glad I helped out."

Golson's rocket closed out Mariano Rivera's 30th save after Jorge Posada belted a towering, pinch-hit homer off Dan Wheeler leading off the 10th inning, striking the large awning beyond the center field wall.

Posada's tape-measure blast, his 18th, bailed the Yankees out from what would have been a crushing game to lose. The Yankees had held a 6-0 advantage in the contest, only to see it erased by a seven-run Rays fifth inning that knocked out rookie starter Ivan Nova.

"That's a huge home run for us," Yankees manager Joe Girardi said of Posada's shot. "On a road trip where we've had some real disappointing losses, that's a huge, huge home run."

The Rays were threatening to break the Yankees' hearts again against Rivera, who allowed a leadoff single to Crawford. Evan Longoria brought the crowd of 28,713 to its feet with a loud flyout to center field, and Crawford moved up by stealing second base.

Matt Joyce lifted a fly ball to medium-depth right field, and Crawford was intent on testing Golson, a September callup who has also seen a sprinkling of big league time with the Phillies and Rangers over the past three years.

"I always make it on that play, that's why I went," Crawford said. "You know, I probably should have been more aware ... from what I heard, he has a great arm. I probably should have been more careful there with the game on the line. But that's the way we play, so I just tried it."

Rays manager Joe Maddon said that he tells his players to take positive risks, and this was one.

"If that ball hits [Crawford] and bounds off him right there, all of a sudden we score another run," Maddon said. "When you're facing Rivera, you do take chances because he does not give up many hits, so I was fine with the play. That was a fabulous throw."

Indeed, Golson was labeled by Baseball America in 2009 as owning the best outfield arm in Texas' system, part of the allure in the Yankees' January trade for the speedster, who turns 25 on Thursday.

"I honestly thought he had no chance, just because he caught it with his momentum pointing back to right field. It was straight as an arrow," A-Rod said. "Whoever would have thought that Greg Golson would make a huge play in the middle of a great pennant race?"

David Robertson was credited with the victory after setting the Rays down in the ninth inning with help from Curtis Granderson, who made a terrific diving catch near the warning track to rob Ben Zobrist of an extra-base hit.

"Anytime an inning extends, especially against this lineup, there's always a possibility that something crazy is going to happen," Granderson said. "You never know. If he gets on there, it's a double -- or possibly a triple. Anything that gets them off the field from hitting is a good thing."

After losing their hold on first place in the division with Monday's extra-inning loss, the Yankees knocked out Matt Garza with six runs in 4 2/3 innings.

Robinson Cano's two-run homer, his 27th, highlighted a four-run third, and the Yankees added two more runs in the fifth when A-Rod connected for his 23rd homer and Francisco Cervelli worked a bases-loaded walk against rookie Jake McGee.

A rout seemed to be in the works, but Nova's first four sharp innings came unraveled. Carlos Pena slugged a solo homer, his 27th, and John Jaso knocked an RBI single.

A pair of run-scoring hits by Longoria and Joyce chased Nova, and Willy Aybar greeted lefty Boone Logan with a pinch-hit three-run homer, giving the Rays their first lead.

"I was pitching good, but one inning -- everyone has one bad inning," Nova said. "Today was a long one, six runs, but I feel good. This was a big [game]. I was waiting for this one."

The Yankees tied it back up in the sixth. McGee walked Granderson to open the inning, then yielded to Jeremy Hellickson, who served up a run-scoring double to Cano -- the second baseman's 98th RBI of the season, marking a new career high.

The next few innings told the story. Between Golson's throw, Posada's homer and Granderson's catch, the Yankees had plenty of opportunities to wipe beaded sweat from their brows and exhale, knowing how close they'd come to losing another one.

"Even if we don't win tonight," Girardi said, "we have guys that have been through tough times and gotten back up this year. But this is maybe one of the toughest tests that we've had."

Instead, the Yankees can enter play Wednesday just as they did upon arriving at Tropicana Field for this showdown on Monday -- owning first place in the AL East for at least another day.

"If you lose it, yes, it could have been tough," Posada said. "But we didn't. I'm happy that we didn't."