NEW YORK — After getting a big double play to end the top of the 12th inning and keep their deficit to two runs, the New York Yankees sensed they still had a chance.
And why not? They already rallied late once against their AL East rivals on Friday night.
" It just gives you hope that just one guy has to get on and you got guys that can hit the ball out of the ballpark through your lineup," manager Joe Girardi said, "Just get Gardy on and then we're going to take our chances."
Brett Gardner did get on, and four batters later Brain McCann hit a three-run homer for a 7-5 victory over the Tampa Bay Rays that moved New York back into sole possession of first place.
Mark Teixeira hit a tying three-run shot in the eighth against Kevin Jepsen, then had an RBI single in the 12th off Steve Geltz (1-4) just as fireworks began shooting off behind the scoreboard in right field.
With the Yankees trailing 5-3, Gardner led off the 12th with a walk from Geltz. One out later, Alex Rodriguez and Teixeira hit consecutive singles, and McCann homered into the right-field stands for New York's first walk-off win since Derek Jeter's final home game in September.
"It's one of the best feelings that you could possibly have," McCann said. "A big spot like that against a team in our division, it's a great feeling."
Tampa Bay lost its sixth in a row and second straight in extra innings.
"If we're dwelling on one inning, the walk to Gardner is kind of what sticks out," Rays manager Kevin Cash said.
Chasen Shreve (6-1) walked two and gave up two hits and a run in the 12th but got a key inning-ending, 5-4-3 double play.
With the score 3-all, Adam Warren walked Logan Forsythe starting the 12th, Brandon Guyer sacrificed. Shreve relieved and walked Asdrubal Cabrera.
Kevin Kiermaier, the No. 8 batter, singled over leaping shortstop Didi Gregorius, and Rene Rivera followed with another RBI hit to put Tampa Bay up 5-3.
The Rays had two baserunners called out trying to stretch singles late — and Tampa was on the wrong end of both replay reviews.
Cabrera was nailed in the ninth on a throw from Gardner, the center fielder. The Rays challenged the call but it was upheld after a review of 2 minutes, 53 seconds.
In the 11th, Evan Longoria slid into second safely but the Yankees requested a review, saying Longoria's foot came off the base popping up, and he was tagged out by second baseman Jose Pirela. New York got the call after a review of 2:06.
"It is unfortunate. I don't know if it's right, wrong, I don't think this is what it was made for," Cash said of the use of replay in this instance. "Whether he was pushed off, tagged off, or the tag was just held on, all of those things, I just don't think that that's, that's not why we have this."
A-Rod had two hits and three of the Yankees nine walks on the day he finally received his 3,000th hit ball.
Teixeira's drive into the second deck in short right field spoiled another stellar outing against the Yankees for Rays starter Chris Archer, who pitched three-hit ball for 6 2-3 innings to lower his ERA to 1.78 against New York in eight starts.
Masahiro Tanaka looked as if he was headed for a third straight rough outing, falling behind 2-0 in the first on Longoria's RBI double and James Loney's sacrifice fly. Rivera hit a sacrifice fly in the fourth after Kiermaier's triple.
Tanaka allowed three runs and six hits in six innings.
Rays: RHP Jake Odorizzi (oblique) is to make one more rehabilitation start before returning to the rotation, manager Kevin Cash said.
Yankees: CF Jacoby Ellsbury (knee) sat out a second straight rehab game for Class A Tampa. He played Monday and Wednesday. "He's working extremely hard it's just he's just going through a spring training again," manager Joe Girardi said. "You don't want to go out there if you are physically fatigued or sore so we just got to get his legs under him and once we do that we'll have a player." ... OF Carlos Beltran went on the DL with a left oblique strain.
Rays: Nathan Karns had his shortest start of the season April 27, when he went 4 2-3 innings in his one start at Yankee Stadium. He is 1-0 with a 3.07 ERA in three starts this year against the Yankees.
Yankees: Michael Pineda (8-5) pitched his first career complete game in his last start, a 3-1 loss to Houston.
The 360-person Mormon Tabernacle Choir performed on the field before the game, singing a medley of patriotic tunes and the national anthem.
Tampa Bay's Steven Souza Jr. struck out as a pinch hitter in the 10th inning after getting ahead 3-0 in the count, and he extended his hitless skid to 25 at-bats, including 15 strikeouts. Souza walked in the 12th.