Any combination of Rays wins and losses by the Rangers and the teams behind them totaling four will send Tampa Bay to the postseason.
Matt Joyce got the Rays' offense rolling from the get-go, leading off the game with his 18th home run of the season on a 1-1 pitch from Yankees starter Hiroki Kuroda.
Wil Myers followed with a single through the middle, and David DeJesus doubled Myers home, then scored on Evan Longoria's sacrifice fly to put the Rays up, 3-0, before the Yankees had a turn at bat.
"That was huge, obviously," Joyce said. "The position that we're in, it's really crunch time. Just to get things started the way that we did today was awesome. You set the tone right from the start. Obviously, Wil and David coming up behind me, not just settling for a couple of runs. But we kept attacking them, kept being aggressive, kept scoring. And that's what it's going to take."
James Loney, who hit a walk-off homer at Tropicana Field to beat the Orioles, 5-4, on Monday, came through with a two-run double in the sixth to push the Rays' lead to 5-0.
The Rays added two more on RBI doubles by Delmon Young -- who came in for Joyce -- and DeJesus.
Meanwhile, the Rays' pitching took care of business.
Matt Moore made his 26th start of the season, bringing along his 8-1 road record, and he managed to stretch the limits of "effectively wild."
"You can't be more effectively wild than he was tonight," Rays manager Joe Maddon said.
The 24-year-old left-hander did not allow a run despite surrendering three hits and six walks, and throwing a career-high three wild pitches.
"There were a lot of baserunners on, so there were definitely some situations there where one base hit and we're [in] a lot tighter of a game than we'd like to be with a three-run lead in the first," Moore said. "Getting some of those key outs with runners in scoring position, I'm happy the way those went. I'm not very satisfied with the situation I put myself in, it seemed, each inning."
Moore threw 107 pitches, 64 of which were strikes, but he managed to get through five innings to notch his 16th win of the season.
"He had no command of his fastball," Maddon said. "The big thing about Matt -- we've talked about this before -- even when he gets a little wild and walks people, he's not giving up hits. Sometimes he has better command of his fastball and gets hit without the walks."
On Monday afternoon, the Rays' bullpen held the Orioles scoreless for 4 2/3 innings. On Tuesday night, they added four more scoreless frames, with Jamey Wright pitching one inning and Jake Odorizzi adding three to pick up his first Major League save.
The Yankees got just four hits, marking the 45th time this season that Rays pitching has held the opposition to five hits or fewer. That's the most such outings in the Major Leagues this season and tied -- with the 2012 Rays -- for the most of any AL team since 1973. In addition, the Rays held their opponent scoreless for a franchise-record 16th time this season and for the third time within the last two weeks.
The Yankees fell to 7-10 against the Rays this season, clinching their fourth consecutive non-winning season series since 2010. Particularly frustrating to Yankees manager Joe Girardi were the 11 baserunners his club stranded.
"It's frustrating," Girardi said. "We had opportunities. We had six or seven walks in the first three or four innings, and we weren't able to put any hits up there. We had a couple of chances -- we had the bases loaded with one out and weren't able to score. Runs have been tough for us lately."