ST. PETERSBURG, Fla. — In between Gary Sanchez embarrassing himself by not hustling in the first and ninth innings, Luis Severino put the Yankees in a hole too deep to escape.

Sanchez’s lack of effort allowed Jake Bauers to score from second on a passed ball — a result of being crossed up in the opening frame — that didn’t get far away from the catcher in foul territory. Then, batting with the bases loaded and two outs in the ninth with the Yankees trailing by a run, Sanchez hit a ground ball to the left side of the infield that second baseman Daniel Robertson fielded and tossed to shortstop Willy Adames at the bag.

Aaron Hicks beat the toss, and it appeared Aaron Judge would score the tying run from third — until you looked up and Sanchez was running like mud moving uphill. He was out at first, and the Yankees left Tropicana Field with a 7-6 loss witnessed by a paltry gathering of 14,670. It was the Yankees’ fifth straight loss to the Rays.

Aaron Boone said he would talk to Sanchez about the lack of effort, and Sanchez admitted he could have done a better job in each situation.

As for Severino, the question wasn’t about effort but effectiveness as he gave up season highs in runs (seven) and hits (11) and lost for the first time since June 10. He is 14-3 with a 2.63 ERA but 1-1 with an obese 7.80 ERA in his past three starts and has given up six homers.

“I was feeling good, everything was there, the changeup, the slider,’’ said Severino, who started to unravel in the fifth, when Bauers smoked a three-run homer to right. David Robertson’s leadoff homer in the sixth was followed by Mallex Smith’s double and Adames’ single, and Chad Green replaced Severino. “I made a couple of mistakes in the middle [of the plate].’’

In their past 14 games, the Yankees are 7-7. Combined with the Red Sox beating the Orioles, the loss dropped the 63-35 Yankees six games back of the AL East leaders. It’s the farthest back the Yankees have been since April 21, when they were 6 ½ lengths back. With their winning percentage dropping to .643, the Yankees no longer have the second-best record in baseball since the idle Astros (66-36) are at .647.

Two unearned runs in the sixth when Sanchez singled in a run and three in the seventh when Giancarlo Stanton (4-for-4) delivered a two-run single cut the Rays’ lead to 7-6.

Facing lefty Jose Alvarado, Brett Gardner opened the ninth with an infield single and Judge walked. That brought Didi Gregorius to the plate, and Boone felt comfortable giving him the bunt sign, even if everybody in the house knew a successful sacrifice would be followed by Stanton being walked intentionally, which is what happened.

“Just the lefty-lefty matchup there and knowing they would walk [Stanton],” Boone said. “What’s the trade-off? Do you like the bases loaded and one out with Hicks from the right side? We did, and we liked getting Alvarado (who fielded the bunt) off the mound in a fielding situation as well. If Didi doesn’t get it done there, they go to the righty for Stanton. It was a tough call, a close call, but one I felt like with the matchups, one we would take.”

With the bases loaded, the Rays played the infield in at the corners for Hicks, and he forced Gardner at home with a grounder to third. That brought Sanchez to the plate, and he ended a brutal night on a second embarrassing note.

“Today is about doing a better job overall,” Sanchez said.

That is true about blocking balls, even when crossed up, which is what happened on the passed ball, and hitting. Running hard after loose balls and to first base? Never should be in question, especially since Sanchez said the groin injury that had him on the DL is not an issue.