It has been four decades since the Yankees and the Red Sox met later than this while holding the two best records in the majors. The last time was a big one: Game 163 in 1978, the Bucky Dent Game, when the Yankees capped an extraordinary comeback to steal the American League East. The Red Sox finished 99-64 and went home for the winter.

There is not as much at stake anymore, of course, even with the wild-card winner sentenced to a one-game knockout round instead of a five-game division series. No big deal, the Yankees insist.

“If we have to play a wild-card game, we’ll play a wild-card game,” said David Robertson, the veteran Yankees reliever. “We did last year — it was fun, it was exciting. We’ve just got to get in.”

The Yankees should easily qualify, considering their 68-40 record. But Friday’s defeat — which started with high and tight fastballs to Mookie Betts and ended with a humbling 4-1 loss on Rick Porcello’s one-hitter — swelled their division deficit to seven and a half games, matching their widest of the season. Mediocre teams in other divisions, like the San Francisco Giants and the Washington Nationals, were closer to first place.

“Just because the Red Sox are on such a historic pace right now, it makes you feel a little delinquent,” said David Cone, the YES Network analyst. “Like you’re missing something.”

Cone, who pitched for five World Series winners, said most strong teams use the same formula to survive the regular season: Ride the hot streaks as long as possible, and play roughly .500 at other times. So it has been with the Yankees, who split their first 18 games, won 17 of their next 18, and followed that up with a 24-12 stretch.

At that point, on June 21, the Yankees were 50-22. Since then, they have gone 18-18, a stretch that has cost them nine and a half games in the standings. Aaron Boone, the Yankees’ rookie manager, said his team had not become frustrated.

“That’s the challenge of being a major leaguer, and another attribute of our club is that they are really good, I feel, at turning the page, coming in with confidence, letting stuff roll off them,” Boone said. “The result has been, for the most part, we’ve played really, really well. I don’t think we’ve lost sight of that.”

The Red Sox lead the majors in runs per game and on-base plus slugging percentage, with the Yankees ranking second in both categories. Yet Boston’s way of scoring seems more suited for October than the Yankees’ approach, which relies more heavily on home runs.

Power, of course, is a very good thing — home runs are the most efficient way to score — but the Red Sox can also play that game. The Yankees lead the majors in homers, but Boston ranked sixth of the 30 teams, while also leading everyone in stolen bases and ranking just 25th in strikeouts.

The Red Sox have struck out seven times in two games this series. On Thursday the Yankees fanned 11 times in five innings against the fill-in starter Brian Johnson, and that was without the injured (and whiff-prone) Aaron Judge and Gary Sanchez. They fanned nine times against Porcello on Friday, and ranked eighth in the majors in strikeouts at game time. But Boone is not concerned.

“No, if we’re scoring runs, absolutely not,” he said. “I think that’s just the nature of some of our guys. We get into deep counts from time to time. I love the skill of being able to put the ball in play and those kinds of things, but as long as we’re consistently scoring runs night in and night out, we know that with our group we’re going to live with some strikeouts.”

Alex Cora, the new Red Sox manager, was the bench coach last season for the Houston Astros, whose hitters pulled off the nearly impossible feat of leading the majors in slugging percentage while ranking last in strikeouts.

Cora has brought that philosophy to Boston, encouraging players to hunt pitches to drive early in counts, and at least make contact with two strikes. The Red Sox ranked just 17th in the majors in pitches per plate appearance, but hold a wide lead in hits.

“In an era that guys swing and miss at a high rate, if you put the ball in play with two strikes and men in scoring position, it’s very important,” Cora said. “With the defensive alignments, there’s a lot of guys in other spots. With two strikes, you spread out, put the ball in play, you might beat a shift or put pressure on the defense — it’s a slow roller, you have two guys going for the ball and something good happens to the offense. It is very important.”

When Judge and Sanchez return, the Yankees will have a deeper and even more dangerous lineup. While elite pitchers can exploit their holes, nobody wants to face them.

“I still think the Yankees, one through nine, have a better lineup, even though there’s a lot of strikeouts up and down,” Cone said. “But there’s something about this team, the Red Sox. They do it in a lot of different ways. Every phase of the game, they find a way to contribute.”

The Yankees’ power bullpen is their best asset, the reason they bailed out a wobbly Luis Severino in the wild-card game last fall and advanced all the way to Game 7 of the American League Championship Series. Now it is even better, with Zach Britton added to Robertson, Dellin Betances, Aroldis Chapman and the gang. But the Yankees’ rotation, even with the upgrades of J.A. Happ and Lance Lynn, can best be described as competent.

Does this sound like a championship recipe? Maybe not, exactly, but it has given the Yankees the second-best record in baseball. That will be good enough for a shot, and that could be all they need.

“Baseball is strange, so I’m not too worried about it,” Robertson said. “We’ve just got to get in.”