The Tampa Bay Rays are loose and raring to go, ready to work overtime -- if necessary -- to win the AL wild card.

"Whatever it takes," designated hitter Johnny Damon said. "It's been a fun ride and hopefully it continues."

The Rays' improbable bid for a third playoff berth in four years comes down to the final day of the regular season after Tuesday night's 5-3 victory over the New York Yankees left them tied for the wild card with Boston. The reeling Red Sox held off the Baltimore Orioles 8-7.

If the teams remain tied after Wednesday night's season finales, they will meet in a one-game playoff at Tropicana Field on Thursday afternoon.

"We have to focus on ourselves ... play our game and not worry about the other side of it," manager Joe Maddon said. "That will eventually take care of itself."

Matt Joyce and Ben Zobrist homered, the bullpen shut down the Yankees after starter Jeremy Hellickson pitched six strong innings, and the Rays kept the score close by turning the third triple play in franchise history.

Throw in Joyce, whose three-run homer wiped out a 3-2 deficit in the seventh -- playing on an injured foot -- and that the Rays were without Casey Kotchman after the first baseman experienced tightness in his chest and was taken to a hospital for tests, and no wonder Tampa Bay feels it has no limits.

"All the indicators are there, let's just keep pushing," Maddon said. "When those things kind of show up, it really promotes even more fight, I think. There's more of a believability about the moment."

Joyce's homer off former teammate Rafael Soriano (2-3) was the All-Star's first in more than three weeks. Zobrist hit a two-run drive off Bartolo Colon in the second, and the Rays kept the Yankees from busting the game opened with the triple play that bailed Hellickson out of a bases-loaded jam in the sixth.

"Everybody's thirsty for offense, and we'd like to score more," Maddon said. "But we're built around pitching and defense."

Jake McGee (4-2) pitched one scoreless inning to get the win. With a crowd of 22,820 standing and cheering, Kyle Farnsworth got the final three outs for his 25th save in 31 chances. The victory was the fourth straight for Tampa Bay, which trailed the Red Sox by nine games before battling back into the wild-card race.

Russell Martin hit a solo homer for the Yankees in the third, but also grounded into the triple play that prevented them from building on the 3-2 lead Nick Swisher gave them with a RBI double.

The Yankees, who clinched the division title and homefield advantage throughout the AL playoffs last week, rested Derek Jeter and plan to play most -- if not all -- of their regular lineup again on Wednesday. Manager Joe Girardi remained undecided on a starting pitcher for the finale, but it figures to be a reliever.

Tampa Bay will go with All-Star lefty David Price, who's 12-13 after finishing second in balloting for the AL Cy Young Award a year ago.

The Rays said he's up to the task.

"I always have the utmost confidence when David pitches. I really do," Maddon said. "Every time he pitches we feel like we're going to win that night. I know some things have not necessarily gone his way this year, but in a very tight moment, you always feel very comfortable about how David will pitch."

Despite squandering their big lead with a miserable September, the Red Sox are excited about still having a chance to make the postseason on the final day.

"I think it's really good for baseball (but) not so good for my stomach," Boston manager Terry Francona said. "It's exciting. If you don't want to show up (Wednesday) and play, you've got no pulse."