Brain McCann hit a three-run homer in the 12th inning, rallying the New York Yankees for a second time Friday night and giving them a 7-5 victory over the Tampa Bay Rays.

Mark Teixeira hit a tying three-run homer 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.

Brett Gardner led off the 12th with a walk from Steve Geltz (1-4). 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.

Tampa Bay lost its sixth in a row, and second straight in extra innings.

Chasen Shreve (6-1) walked two and gave up two hits and a run in the 12th but got a key inning-ending double play.

Copyright 2015 The Associated Press. All rights reserved.