The Mets' Francisco Alvarez reacts after hitting a single during...

The Mets' Francisco Alvarez reacts after hitting a single during the ninth inning against the Marlins on Saturday in Miami. Credit: AP/Lynne Sladky

On May 16, the Mets and Yankees played for the first time this season in the Subway Series. Both teams were in first place. It was early, but it was natural to dream about a real Subway Series — the World Series kind.

Those dreams seemed reasonable at the time. They seemed reasonable for about another month — the Mets were 45-24, the Yankees were 42-25 — before both teams started June swoons that lasted way longer than you would have guessed.

Now we’re heading into the final day of the regular season. For the Mets and Yankees — believe it or not — the dream of a New York, New York World Series is still alive.

Barely. But there’s a heartbeat.

The Mets go into Sunday with a chance to earn a wild-card berth. The Yankees go into Sunday having already clinched a playoff spot but with a chance to win the AL East title.

The Yankees’ situation is simpler and less dramatic. After beating the Orioles on Saturday, 6-1, for their seventh straight victory, the Yankees (93-68) have the same record as Toronto, which beat Tampa Bay, 5-1.

But the Blue Jays won the season series, so if Toronto wins on Sunday, it doesn’t matter what the Yankees do. Toronto would be the AL East champion and the Yankees would host a best-of-three Wild Card Series starting on Tuesday.

As my Newsday colleague Greg Gutes has pointed out, with a win on Sunday, the Yankees could finish with eight straight victories and 32 in their last 44 and still not win the division.

Cry me a river, Mets fans say.

The Mets were staggering toward the season’s final day before Clay Holmes threw six clutch innings on Saturday in a fumigating 5-0 victory in Miami. The combined one-hitter guaranteed that they will have a chance to earn a playoff spot on Sunday, but because the Reds own a tiebreaker advantage, the Mets don’t control their fate. To keep playing, they’ll have to beat the Marlins again and get help from the Brewers.

You’ve probably heard the cliche in which a player or manager will say, “If you had told me in spring training that we’d be in a position to possibly be in the playoffs on the last day of the season, I’d sign up for that.”

In the Mets’ case, that’s pure bunk.

With a $340 million payroll after signing Juan Soto, the Mets expected to be one of the top teams in baseball all season, not just the first 2 1⁄2 months. They expected to be battling the Phillies for the NL East title, not hanging on for their postseason lives in the final weekend and having little idea who is going to pitch for them — not because their starters are gassed but because so many of them have been ineffective for such a long time.

The Mets got away with that on Saturday because of Holmes’ Feat of Clay. It was exactly what they needed and what they will need — perhaps from their whole staff — on Sunday as they battle the Marlins on the field and the Reds in the standings. Manager Carlos Mendoza said Sean Manaea will start on Sunday.

The Mets have last season’s improbable, magical run to, and through, the postseason to guide them. They won’t be afraid of the moment. But will they be up to it? It’s delicious drama.

The Yankees will start Luis Gil on Sunday.

One of MLB’s best and least-noticed innovations over the last few years has been starting every game on the final day in the 3 o’clock hour. That way neither the Yankees nor Blue Jays can gain an advantage based on the other team playing earlier. To earn the division title and the first-round bye that goes along with it, both teams have to go all-out to win on Sunday. And that could negatively impact the division loser, given that that team will have to start its Wild Card Series 48 hours later.

Either way it turns out, the Yankees are a confident bunch, with Max Fried and Carlos Rodon an imposing 1-2 for any postseason series. Potential Game 3 starter Cam Schlittler threw seven shutout innings on Saturday. Aaron Judge and Giancarlo Stanton are hitting home runs and driving in big runs seemingly every day.

Regardless of when they open the playoffs — even if it’s on the final day of September — the Yankees seem ready for October. Yankees fans are ready, too.

Mets fans? They have to be ready for anything on Sunday. Joy or heartbreak.

What a day it’s going to be in New York baseball.

And it could be just the beginning.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME