Mets catcher Robinson Chirinos talks to starting pitcher David Peterson...

Mets catcher Robinson Chirinos talks to starting pitcher David Peterson as pitching coach Jeremy Hefner approaches the mound during the second inning against the Phillies in an MLB game at Citi Field on Monday. Credit: Kathleen Malone-Van Dyke

The Mets spotted the Phillies and old friend Zack Wheeler a five-run lead after an inning and a half on Monday at Citi Field.

But the Mets can smell a postseason spot. In this shortened season, no game can be given away after an inning and a half.

Even after allowing another run in the fifth, the Mets came all the way back, scoring the next seven runs and taking a one-run lead on a mammoth three-run homer by Jeff McNeil with two outs in the seventh as the home bench exploded in joy.

But the Phillies can smell the postseason, too. Joe Girardi’s team tied it against Jeurys Familia in the eighth and went ahead for good on Jean Segura’s two-out, two-run home run off Miguel Castro in the 10th.

In the bottom of the 10th, not even baseball’s version of the NHL’s shootout could save the Mets. After starting the inning with a runner on second base, the Mets scored on Brandon Nimmo’s one-out single. But they could not push across another run against Hector Neris and lost to the Phillies, 9-8.

The final out was a drive to the warning track in center hit by J.D. Davis.

“We were able to battle and just give ourselves an opportunity to win the game, which is nice,” McNeil said. “Next time, we’re going to close the deal and hopefully get a win.”

The Mets split the four-game series with the NL East’s second-place team. The Mets (19-23), who entered the day one game out of the NL’s final wild-card spot, have 18 games left. “It’s a tough loss, like all the losses are tough in a season like this,” manager Luis Rojas said. “Short season. They count a little more.”

Castro, whom the Mets acquired from the Orioles at the Aug. 31 trade deadline, nearly got out of the 10th when, with the free runner on third, J.T. Realmuto grounded to short and the Mets erased Rhys Hoskins in a rundown for the second out, leaving a man on second.

But Segura cracked a no-doubt home run off the billboard of a giant green M&M in left-center to put the Phillies on top.

Rojas decided to bring in Castro even though Edwin Diaz had retired the Phillies on 12 pitches in the ninth. Rojas said he didn’t want Diaz to throw two innings.

“We had Castro coming in and we thought he matched up really well to who was coming up,” Rojas said. “He got two quick outs and just got to a 1-and-1 count and left that sinker a little bit over the middle, down over the plate where Segura could extend his arms.”

Andres Gimenez doubled to lead off the fifth against Wheeler before Michael Conforto, Davis and Dominic Smith hit consecutive two-out RBI doubles to make it 6-3.

It was 6-4 in the seventh when McNeil hit a three-run homer into the upper deck in right off former Yankee David Phelps to give the Mets a 7-6 lead.

McNeil needed 116 at-bats to hit his first home run on Sunday. He needed just five more to hit his second.

But the Phillies tied it at 7 in the eighth on Alec Bohm’s two-out RBI single off Familia.

David Peterson put the Mets in a 5-0 hole. The rookie lefthander allowed a three-run double by Segura (4-for-5, five RBIs) in the first and a bullet two-run homer by Hoskins in the second.

Peterson was pulled after two innings. He gave up three hits, walked four and struck out three. Of his 70 pitches, 37 were strikes.

Erasmo Ramirez, in his first outing as a Met, kept his team in the game by allowing one run in five innings. The 30-year-old righthander was called up from the alternate site on Friday. Monday’s outing was his second big-league appearance since 2018.

Realmuto homered to right in the fifth to make it 6-0, but that was all Ramirez allowed.

Said Rojas: “Erasmo put us in a good position to probably get a win today.”

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME