BOSTON — In the eighth inning at Fenway Park on Wednesday, it didn’t matter that the Red Sox were in last place in the AL East and there was no threat of catching the Yankees in order.
Instead, Boston inched closer to potentially stealing the win from the Yankees with a late rally against Jonathan Loaisiga.
But in a game of inches, the Yankees caught a break in their 5-3 win, their fourth straight to preserve a six-game lead over the second-place Blue Jays, who beat Tampa Bay.
Clinging to the lead in the bottom of the eighth, JD Martinez appeared to avoid turning into an inning-ending double play by beating out Gleyber Torres’ first pitch, which would have allowed Alex Verdugo to score and cut the Yankees’ lead. . But the Yankees contested the play and replays showed that Martinez stepped just short of the base, never touched the bag, and was thrown out.
The Yankees then hung on in the ninth, despite Clay Holmes allowing a run for his third straight shutout.
In front of a sellout crowd of 36,581 at Fenway Park, the Yankees completed a victory over the last-place Red Sox in their final game of the season.
And while Aaron Judge was held to 57 homers, they got plenty of offense from their depleted lineup, as Nestor Cortes gave up just one run in five-plus innings in his second start after a groin strain.
Torres sparked the victory with another productive play at the plate.
The second baseman’s resurgence continued with his fifth-inning RBI single that turned into a Keystone Kops home run thanks to some sloppy Boston defense, as three errors led to four unearned runs.
A slumping Aaron Hicks reached on an error in the fifth when Xander Bogaerts couldn’t handle his hard-hit grounder up the middle.
Judge followed with another sharp grounder, which Bogaerts stopped with a leaping play, but it went for an infield single.
Giancarlo Stanton homered for the third time on the night and Torres singled to right to score Hicks, then Connor Wong picked off Alex Verdugo’s throw to right and, in an attempt to get Torres out at first, threw the ball back to right field.
That allowed Judge to score easily, and a busy Torres circled the bases and slid home safely.
Torres had a role in the Yankees’ final run of the night, when Abraham Almonte misplayed his long fly ball to center in the top of the ninth, allowing Tim Locastro to score after running for Stanton.
After a six-pitch first inning, Cortes gave up a leadoff double to Rafael Devers in the second, then walked Martinez.
But he recovered and got Rob Refsnyder to fly out to right, pinch-hitting Christian Arroyo before Kiké Hernandez popped out to end the threat, getting help from Oswald Cabrera in right and Isiah Kiner-Falefa at shortstop.
Cortes rolled after the second, retiring nine in a row at one point — including back-to-back homers in the fourth in Bogaerts, Devers and Martinez.
Boston came back in the bottom of the fifth on Wong’s double into the left field corner that scored Refesnyder from first.
Green Monster’s Jose Trevino’s double to left scored Kiner-Falefa to make it 4-1.
Cortes left after walking Verdug to start the bottom of the sixth, and Clarke Schmidt came in to relieve Bogaerts, Devers and Martinez.
Loaisiga replaced Schmidt in the eighth and gave up back-to-back singles to left to knuckleballers Reese McGuire and Tommy Pham. Verdugo grounded into a force out, and Bogaerts blooped a hit to right to load the bases.
Marwin Gonzalez then booted Devers’ grounder to first as Pham scored to make it 4-2 before Martinez grounded into a double play.