NEW YORK -- Twelve minutes into Aaron Hicks' return from 3 1/2 weeks on the disabled list, Tampa Bay had loaded the bases in the first inning when Wilson Ramos drove a changeup toward the Yankees' bullpen in right-center field.
"Oh, gosh," New York rookie left-hander Jordan Montgomery thought to himself on the mound.
Hicks raced from center to the 385-foot sign and leaped to get his glove above the wall. He snagged the ball in the webbing, squeezed it tight and limited Ramos to a sacrifice fly with his Hollywood grab.
After nearly falling behind on a grand slam, the playoff-bound Yankees beat the Rays 6-1 Tuesday night to clinch home-field advantage if they end up in the AL wild-card game next week.
New York closed within three games of AL East-leading Boston with five remaining. If the Yankees and Red Sox finish even, they would play a tiebreaker game in New York on Monday, forcing difficult decisions on whether to use top pitchers.
"It becomes really complicated," Yankees manager Joe Girardi said.
Tampa Bay (76-81) was eliminated from playoff contention and missed the postseason for the fourth straight year.
"It was kind of a slow death, which is not fun," manager Kevin Cash said.
Montgomery (9-7) allowed singles to his first two batters and walked the next one before striking out Logan Morrison. Ramos thought he had his second slam in five days.
"I thought he hit it pretty well, but it just kind of died for me and gave me a great opportunity," Hicks said.
Ramos expected the ball to carry in Yankee Stadium
"That was a homer. He jumped and he stole that," he said.
Montgomery then fanned Adeiny Hechavarria to end the inning and didn't allow another runner past second. Told his night was over after giving up six hits in six innings, Montgomery walked over to Hicks in the dugout and gave him a hug.
"Thanks for saving me," Montgomery remembered saying.
Hicks strained his right oblique muscle June 25 on a checked swing against Texas and did not return until Aug. 10. He strained his left oblique at Boston on Sept. 2 when he reached up to make a running catch on the warning track of Hanley Ramirez's drive.
He walked three times and struck out in the sixth, leaving him with a .264 average, 13 homers and 49 RBI in 83 games. The great grab gave him confidence.
"It's definitely a big test," Hicks said. "I'm fully extended and I was able to make the catch and I felt good and the body feels good right now."
Starlin Castro hit a 445-foot home run leading off a four-run second, and New York (88-69) won for the 17th time in 23 games to move 19 games over .500 for the first time since finishing 95-67 in 2012.
In the shortest of his 42 big league starts, Snell failed to retire any of his six batters in the second inning and threw only 24 of 49 pitches for strikes.
"I just kept opening up and couldn't make the adjustment to staying closed," he said.
Hicks' play had changed the game.
"Incredible," Girardi said. "I was worried off the bat."
New York threw its 52nd wild pitch of the season with Sanchez behind the plate.
SEAT OF THEIR PANTS
IN THE MONEY
Ramos started his 55th game at catcher, triggering a rise in his salary next year from $8.5 million to $10.5 million as long as he doesn't finish the season on the disabled list because of a right knee injury. If he starts the five remaining games, his salary would rise by an additional $250,000.
"I feel excited because I'm healthy and catching a lot and that's my job," he said.
Retired heavyweight champion Mike Tyson was on the field during batting practice.
Rays: RHP Alex Cobb won't pitch again this season because of workload.
Yankees: RHP Adam Warren, who hasn't pitched since Sept. 1 because of a lower back spasm, tossed a two-inning simulated game and could be activated this week.
More AP baseball: https://apnews.com/tag/MLBbaseball
Cards' Yadier Molina takes exception to quips by Cubs' Kris Bryant
Cardinals catcher Yadier Molina took exception to quips about St. Louis by Cubs star Kris Bryant and Ryan Dempster, saying only "stupid players and losers" make fun of other cities.
Kris Bryant: 'Not good' that stars Bryce Harper, Manny Machado remain unsigned
Kris Bryant and Evan Longoria expressed frustration that several free agents, including stars Bryce Harper and Manny Machado, are still looking for jobs as February nears.
Buster's Buzz: Red Sox repeat? Four question marks facing the champs
From health to hangovers, Boston still must find a few answers in its quest for a second straight ring.
Yankees sign reliever who criticized Babe Ruth
Mike Golic finds it comical that the Yankees signed reliever Adam Ottavino who previously stated he would "strike out Babe Ruth every time."
Mariano Rivera, Lee Smith and what makes a Hall of Fame closer
One is a first-ballot lock. The other a last-chance inductee. Here's what Cooperstown's 2019 ninth-inning stars tell us about Hall standards for the position.
Angels reach one-year deal with Cody Allen to be closer next season
The Los Angeles Angels have reached an agreement with relief pitcher Cody Allen on a one-year deal to be their closer next season, league sources told ESPN.