The Yankees reduced their magic number for home field advantage to four with a 4-1 win over the Rays, but it may have come with a heavy price tag. Aaron Hicks left Monday night’s game in the bottom of the fourth inning. The center fielder had a tight left hamstring, according to reporters at Tropicana Field.

Hicks had just beat out a double play and seemed to come up limping slightly as he slowed down. After the game, Yankee manager Aaron Boone told reporters that Hicks would have an MRI on the hamstring, but said the team was “guardedly optimistic.”

Aaron Hicks comes up limping after beating out this double play and later exits Yankees’ win. (Joseph Garnett Jr. / Getty Images)

That’s the second significant injury blow since the Yankees clinched their place in the American League wild card game on Saturday. Didi Gregorius was diagnosed with a small tear in cartilage in his right wrist Sunday, an injury that he suffered while scoring the game-winning run in the clinching game. Hicks had the hit that brought him home in that game as well.

Now, the Yankees are fighting for the top wild card spot, and more specifically the home-field advantage that goes with it. They at least maintained their 1.5 game lead over the A’s with Monday night’s win. Any combination of four Yankee wins and A’s losses will guarantee that the win or go-home wild card game will be played at Yankee Stadium — avoiding a cross country flight before a possible division series, which would begin in Boston.

The Yankees are clearly already looking ahead to that game, resetting their rotation Monday by going with a “bullpen game.” Jonathan Holder was the Yankees’ opener Monday, pitching a scoreless inning before giving way to a parade of seven more pitchers, including Aroldis Chapman pitching the seventh, Dellin Betances pitching the eighth and Zach Britton closing. Sonny Gray gave up the only Rays run in two innings pitched and picked up the win.

That allowed Aaron Boone to push back his starters, giving them each an extra day of rest, and it realigned them in preparation for the October 3 wild card game.

Andrew McCutchen homered and Brett Gardner, who came in to replace Hicks, singled in a run. Giancarlo Stanton and Aaron Judge each doubled in a run.

Gardner, who lost his starting job to McCutchen, also made a game-saving play in the sixth inning. With two on and the Yankees clinging to a 3-1 lead, Gardner slammed into the center field fence and held on to Brandon Lowe’s fly ball to end the inning. It was just the fifth time Gardner has played center field this season.

Gardner could be crucial if the Yankees have to endure any significant time without Hicks.

They are hoping, however, that they will have those two big bats back for the wild card game.

Hicks is hitting .248 with 26 homers and 76 RBI in what has been a breakout season for him.

Gregorius and manager Aaron Boone were optimistic the shortstop would play again this season before Monday’s game. Gregorius told reporters at the ballpark that the wrist felt significantly better and that he thought he would play again this season. Boone said that Gregorius would have the wrist looked at and evaluated on Wednesday.