Aaron Judge of the Yankees strikes out during the seventh inning...

Aaron Judge of the Yankees strikes out during the seventh inning against the Boston Red Sox at Yankee Stadium on Sunday, July 7, 2024. Credit: Jim McIsaac

After three outings that in the kindest of terms would be described as subpar, Luis Gil rediscovered the form that, as the calendar turned to June, had him firmly in the discussion of candidates to start the All-Star Game.

Gil allowed only one run in 6 2⁄3 innings against the Red Sox on Sunday night. But the Yankees’ offense, very much in poor form for the better part of a month, saw that trend continue. They managed only four hits, and Gil ended up the hard-luck loser in a 3-0 loss in front of 45,250 at the Stadium.

After posting a 14.90 ERA in his previous three outings, Gil was dominant, allowing four hits. Sporting an equally devastating fastball and slider, he struck out nine and did not walk a batter.

His one mistake came late — a 2-and-2, 98.8-mph fastball that Rafael Devers poked over the leftfield wall with one out in the seventh to snap a scoreless tie.

Devers added home run No. 21 in the ninth, jumping on a fastball that clearly was outside and hitting a 423-foot solo shot into the Yankees’ bullpen off Michael Tonkin to make it 3-0. In between, Ceddanne Rafaela hit a two-out homer off Luke Weaver in the eighth.

As good as Gil (9-5, 3.27) was, Kutter Crawford was even better. Remarkably pitch-efficient, Crawford (5-7, 3.24) needed only 68 pitches to throw seven scoreless innings. He allowed four hits, walked none and struck out four.

“He was just nibbling the edges,’’ Juan Soto said. “He actually made a couple of mistakes. We just couldn’t capitalize.”

Justin Slaten worked around a one-out walk in the eighth and Kenley Jansen retired the Yankees in the ninth for his 18th save. He got Ben Rice, who homered three times in the Yankees’ 14-4 win on Saturday, to ground to first, part of a 0-for-4 night for the rookie. Soto lined softly to left and Aaron Judge (0-for-4 with three strikeouts) struck out swinging to end it.

The Yankees (55-37) have lost 15 of their last 20 games and the Red Sox (49-40) — who were 14 games behind the Yankees on June 14 — have won 14 of their last 19 to move within 4 1⁄2 games of them. The Yankees also have seen a 3 1⁄2-game lead over the Orioles turn into a three-game deficit in the same span.

“It feels terrible,’’ Aaron Boone said of the Yankees’ recent stretch. “You gotta be a little sick to be in this game and you’ve got to be able to weather it. You’d like your stretch where it’s a bump in the road to not be this kind of stretch. You’d like to weather it a little bit better, which we need to do obviously. But it’s all right there in front of us.”

Said Soto, “It’s tough. It’s never fun this way, but we all know about baseball. It’s part of the game. It all depends on how you get out of it, how you take it every day and come back the next day. That’s what it’s all about.”

Gil, who had allowed 16 runs, 14 hits, nine walks and five hit batsmen in 9 2⁄3 innings in his most recent three starts, came out throwing heat Sunday night, hitting 98 mph several times in a 1-2-3, 13-pitch first.

“We’ve been working all week to be able to execute good fastballs out there and mix all the pitches. Pretty good,” he said.

“His strike-throwing was excellent, way better profile on the fastball, and then everything else kind of runs in sync with that,’’ Boone said. “His delivery was good . . . Slider was really good tonight, and that’s hands-down the best slider we’ve seen from him. But it started with the fastball . . . That’s a very encouraging part of a tough end to a tough series, Luis throwing the ball like that.”

Gil allowed a leadoff single by Devers to start the second and Connor Wong beat out a potential double-play ball to third. With Masataka Yoshida up, Wong took off for second. He initially was called safe on Austin Wells’ throw to Anthony Volpe, but the Yankees challenged and the ball was overturned. That was no small achievement considering the Red Sox stole nine bases against the Yankees on June 16, though the catcher that night was Jose Trevino. Gil struck out Yoshida swinging at a slider to end the inning.

Gil retired Tyler O’Neill on a grounder to third to start the seventh, but the lefty-swinging Devers hit a drive just over the leftfield wall for his 20th homer and a 1-0 lead. His 28 homers against the Yankees — in 398 at-bats and 106 games — are the most among active players.

“If I’m able to execute pitches, I feel like I have a pretty good chance at getting guys out, regardless of who the batter is,’’ Gil said. “That’s what it’s all about; you miss a pitch and the quality of hitters in this league are going to make you pay.”

Rafaela, who hit a two-run homer off Tommy Kahnle in the 10th inning to give the Red Sox a 5-3 victory over the Yankees on Friday night, blasted a first-pitch cutter from Weaver 412 feet to left with two outs in the eighth to make it 2-0.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME