Yankees reliever Tim Hill pitches against the Tampa Bay Rays...

Yankees reliever Tim Hill pitches against the Tampa Bay Rays during the fifth inning of a game on Wednesday in St. Petersburg, Fla. Credit: AP/Steve Nesius

ST. PETERSBURG, Fla. — Though bad starting pitching and an inconsistent offense have been front and center in contributing to the Yankees’ nearly month-long collective slump, volatility in the bullpen hasn’t been far behind.

The unit saved the Yankees Wednesday night.

Four relievers, starting with Tim Hill and ending with Clay Holmes, who recorded a four-out save, combined to stifle the Rays over the final 4 2/3 innings of a 2-1 victory over the Rays in front of 19,246 at Tropicana Field.

“The bullpen was incredible,” said Marcus Stroman, who lasted 4 1/3 innings.

The Yankees (56-38), losers in 16 of their last 21 games entering the night, go for their first series victory in eight tries Thursday night before heading to Baltimore for three games against the AL East-leading Orioles, whom they trail by two games.

The Yankees, whose offensive output consisted of an RBI double by Trent Grisham in the second and sacrifice fly by the centerfielder in the fourth, were outhit by the Rays, 10-6. But the Rays (45-47) went 0-for-10 with runners in scoring position and stranded 12.

“That was the ultimate bend but don’t break,” Aaron Boone said with a weary smile afterward. “Playing the nickel defense on them there. But just a great job. Guys coming through over and over again.”

After getting out of a two-on, two-out jam left for him by Tommy Kahnle, Holmes, named to the AL All-Star team last weekend, earned his 20th save in 25 chances by striking out two in a perfect ninth.

Grisham helped Holmes escape the eighth-inning jam, chasing down near the track in right-center a scorched drive by Yandy Diaz, saving one run at least and maybe two.

“I wasn’t sure,” Grisham said of feeling if he had a chance at it off the bat. “I got a pretty good read, but it was hit a lot better than I thought originally. Had to adjust course a little bit but happy to make the play, obviously.”

Hill, coming on with the bases loaded and one out in the fifth for Stroman — the Rays with one run on the board and poised for more — struck out Josh Lowe looking. Then he got Yankee killer Randy Arozarena to fly to right.

“I was pumped, to say the least,” said Hill, a lefty side-armer who has a 2.38 ERA in eight games since being signed by the Yankees June 20 (he was DFA’d by the White Sox June 12).

Luke Weaver took over for Hill with runners on first and second with one out in the sixth and, with a first-pitch cutter, got Taylor Walls to hit into an inning-ending 4-6-3 double play. Weaver contributed 1 2/3 scoreless innings.

“I think it just boosts the morale,” Hill said of the bullpen’s work. “Obviously, I came in and got out of that bases-loaded jam, and then (Weaver) came in and picked me up, which was huge. And then Clay came in after him. It’s good for the boys.”

Stroman, who came in 1-2 with a 6.43 ERA over his previous four starts, allowed one run, seven hits and two walks.

“I feel like I didn’t pitch like I needed to in the fifth there, which is very frustrating,” said Stroman, who was at just 62 pitches through four after a fairly quick 1-2-3, fourth. “But I felt like early on I was able to keep them at bay and make pitches when I needed to.”

The Yankees scored in the second. Anthony Volpe, in a 3-for-37 skid, laced a single to right. Grisham took a 0-and-2 cutter to left, the ball hugging the line and glancing off the top of the short wall near the foul pole, the RBI double making it 1-0. After Jose Trevino flied to center, DJ LeMahieu got hit on the left pinkie with a 92-mph fastball but, after briefly going to the ground, stayed in the game (it was an overall rough game physically for LeMahieu, who fouled a 0-and-2 pitch off the dirt and into his throat in the seventh inning before striking out). Alex Verdugo flied out to end the inning.

The Yankees added on in the fourth. Gleyber Torres worked a leadoff walk and went to third when Volpe grounded out to first and Diaz, the first baseman, threw wildly to second trying for the lead runner. Grisham’s sacrifice fly made it 2-0.

“I think it’s big to win a game like that,” Grisham said. “Really nitty gritty, just well-fought the whole way. For our pitchers to come up big in all those situations, I think that’s going to do a lot for us going forward.”

More Yankees headlines

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME ONLINE