NEW YORK — For the fourth straight year, the Tampa Bay Rays will fail to finish with a winning record.

Blake Snell was removed after needing 88 pitches to get eight outs, Mark Teixeira broke open the game with a fourth-inning grand slam off Kevin Jepsen, and the New York Yankees held on through three rain delays to beat the Rays 7-5 Friday night.

Tampa Bay (59-81) lost for the fifth time in six games. The team had losing seasons from 1998-07 followed by consecutive winning records from 2008-13.

“Just play for each other right now. Nobody cashes in a year,” said Steven Souza Jr., who hit his third homer in two games. “That’s why we’re professionals. We care about ourselves. We’re professional no matter how many wins or losses we have.”

There were stoppages of 21 minutes in the fourth inning and 22 minutes in the sixth caused by brief light rain. As a downpour began in the ninth, umpires halted play with a 2-2 count on Brad Miller after singles by Kevin Kiermaier and Evan Longoria off Dellin Betances put runners at the corners.

Betances stayed in after a 51-minute delay, and struck out Miller. Logan Morrison hit an RBI single, and Betances struck out Souza at 12:11 a.m. for his career-best 10th save.

“I’ve never seen anything like that before,” Souza said of the three interruptions. “But the way we stayed in it was pretty impressive.”

Snell (5-8) allowed three runs, six hits and three walks in his second-shortest start this season. He has lost three of his last four outings.

“Trying to be too fine. Trying to do too much,” he said. “It’s kind of been the same story.”

Justin Marks, a 28-year-old left-hander, entered in the fifth for his second major league appearance and first since April 20, 2014, for Kansas City at Minnesota. He pitched three hitless innings with five walks and two strikeouts.

“It wasn’t ideal, but to be able to kind of grind through it and come out with zeros, I know it helped out the bullpen, so I’m happy with it,” he said.

Rays manager Kevin Cash termed it a “very strange outing.”

“That’s not how you draw it up, but at the end of the day it’s a zero,” he said. “I’m confident he’ll be in the strike zone more.”

Matching their longest winning streak this season, the Yankees (75-65) closed within one game of Baltimore and Detroit for the second AL wild card.

Tampa Bay left fielder Corey Dickerson took a bad route as Rob Refsnyder’s first-inning liner went by for an RBI double, then allowed Teixeira’s third-inning drive to go over him and off the wall for a double, setting up Teixeira to score on a wild pitch. After the Rays closed to 3-2 in the fourth, rookie catcher Gary Sanchez threw from his knees to pick off Dickerson at second base.

New York was ahead 3-0 before Morrison and Souza hit consecutive home runs in the fourth, the first into the luxury suites below the third deck in right, the second off the left-field foul pole. The Rays hit six home runs in the first two games of the series, all solo shots.

Souza and Bobby Wilson had run-scoring singles in the sixth. Kiermaier had two hits, extending his career-best hitting streak to 13 games.

“I like the way the guys continue to battle,” Cash said.

INSTANT IMPACT

New hitting coach Chad Mottola joined the Rays for the series opener Thursday, and Kiermaier and Souza homered twice in a 5-4 loss.

“I’m not dumb enough to claim that,” Mottola said.

Mottola was taken by Cincinnati with the fifth overall pick in the 1992 amateur draft, one spot before the Yankees selected Derek Jeter.

“I thought since Jeter retired, it may go away, but I guess it’ll never go away,” Mottola said. “It was part of my speech yesterday to remind these guys of how this game has humbled me and I’m constantly reminded, so I understand the failures that it brings.”

TRAINER’S ROOM

Rays: A day after he was hit by a pitch on his right elbow, Miller was at designated hitter rather than shortstop or first. “Let’s use our heads here a little bit. Give him one more day from having to throw,” Cash said. … Morrison was hit on the right shoulder by a pitch from Tommy Layne leading off the eighth. “Shoulder, triceps area, it’s fine,” he said. Morrison unsuccessfully tried to wave away Cash and assistant athletic trainer Paul Harker when they went to first base to check on him. “They thought it hit me in the head, but it’s fine,” Morrison said. “The game was too long anyways. I didn’t need them to come out and talk to me.” … Wilson took foul tips that appeared to hit a quadriceps and above a knee.

UP NEXT

RHP Masahiro Tanaka (12-4) starts for the Yankees on Saturday against RHP Chris Archer (8-17). Tanaka is 5-0 with a 2.08 ERA in his last six starts; Archer leads the majors in losses and strikeouts (211).