ST. PETERSBURG, Fla. (AP) -- A pitching duel one night, and a slugfest the next. The race for the AL East title is turning into an entertaining show.
The New York Yankees and Tampa Bay Rays went extra innings for the second straight night Tuesday, with the defending world champions winning 8-7 to regain the division lead they relinquished with a 1-0 loss in the opener of the important three-game series at Tropicana Field.
Jorge Posada led off the 10th inning with a pinch-hit homer, and the Yankees ended a season-high four-game skid to pull ahead of the Rays by one half-game. The teams play five more times over the next nine days.
" It's big. Any win is big,'' Yankees closer Mariano Rivera said. " This one feels like it was never going to come."
Robinson Cano and Alex Rodriguez also homered for the Yankees, who squandered a six-run lead before tying it at 7 in the sixth on Cano's RBI double. Posada drove a 2-0 pitch from Dan Wheeler (2-3) over the center field wall, setting off cheers from a large contingent of New York fans among the crowd of 28,713 at Tropicana Field.
" That's a huge home run for us,'' New York manager Joe Girardi said. " On a road trip where we've had some real disappointing losses, that's a huge, huge win."
The Rays erased a 6-0 deficit with a seven-run fifth inning that Willy Aybar finished with a three-run, pinch-hit homer off Boone Logan . Slumping slugger Carlos Pena began the rally with his first homer since Aug. 30.
David Robertson (4-4) pitched the ninth and Rivera worked out a 10th-inning jam with help from a game-ending double play for his 30th save in 33 opportunities.
" It was a great game once again,'' Tampa Bay manager Joe Maddon said. " I loved the way we played. It just didn't work out in the end."
Reid Brignac 's 11th-inning homer gave Tampa Bay a 1-0 victory and put the Rays atop the standings on Monday night, when aces CC Sabathia and David Price each worked eight scoreless innings in a matchup of the top two winners in the AL.
" I've been saying all along it's going to go back and forth,'' Maddon added of the race for the division title. " There's no reason to believe any of these games will be easy."
Cano hit a two-run homer off Rays starter Matt Garza in the third and delivered his game-tying double off Jeremy Hellickson . Rodriguez also went deep against Garza, hitting his 606th career homer in the fifth.
Rodriguez also had a RBI single in the third before scoring on Cano's 27th homer of the season. Cano's run-scoring double in the sixth gave the All-Star second baseman a career-best 98 RBIs.
The Rays threatened in the 10th with Carl Crawford reaching on a broken bat single and stealing second with one out. Rivera escaped, though, when Matt Joyce flied to right fielder Greg Golson , who threw out Crawford trying to advance after the catch.
The Rays didn't second-guess the speedy Crawford's decision, even though he likely would have scored easily if Tampa Bay could have come up with a two-out single.
" With Rivera out there, you can't just assume you'll get a base hit. ... If he gets to third, there are other ways to score, too," Maddon said.
" I always make it on that play, and that's why I went,'' Crawford said. " That's the way we play. When you get thrown out, it easy to say you shouldn't have run."
The Yankees were surprised Crawford tried the advance. Centerfielder Curtis Granderson shouted to Golson that Crawford was tagging up, and the rookie made a perfect throw to Rodriguez at third base.
" I didn't think he was going to be going,'' Golson said. " I just tried to give Al a good throw."
Mark Teixeira 's sacrifice fly during a four-run third snapped a string of 16 consecutive scoreless innings for the Yankees that began in the seventh inning of Sunday's 4-1 loss at Texas. Cano's homer ended the team's longest homerless drought since it also went four games without one from June 19-22, 2008.
Garza allowed six runs and nine hits over 4 2-3 innings. The outing came on the heels of another poor performance in which he blew a 4-0 lead while yielding four homers and six runs overall in 4 1-3 innings of an 11-5 loss at Boston.
Yankees starter Ivan Nova limited the Rays to Carl Crawford 's first-inning single and a pair of walks until Pena began Tampa Bay's big inning with his 27th homer. John Jaso , Evan Longoria and Joyce followed with RBI singles before the second pinch-hit homer of Aybar's career.
Nova, who allowed six of eight batters to reach base in the fifth, gave up six runs and six hits in 4 2-3 innings. Logan had not given up a run in 25 consecutive appearances, the second-longest scoreless stretch for a Yankees pitcher since 1920.
After being held to four singles by David Price and three Rays relievers on Monday night, the Yankees had 13 hits and stranded 11 runners. After Rodriguez's homer made it 5-0, they loaded the bases twice but only got one run of it.
Notes: Cano had gone 53 at bats since last homering on Aug. 30. ... With Pena struggling at the plate, Tampa Bay dropped him fifth to seventh in the batting order. He began the night in a 2 for 38 slump and batting .200, lowest in the majors among qualifiers.