Sean Gilmartin #36 of the New York Mets is removed...

Sean Gilmartin #36 of the New York Mets is removed from a game in the first inning against the Philadelphia Phillies by manager Terry Collins #10 at Citi Field on Saturday, Sept. 24, 2016. Credit: Jim McIsaac

When Terry Collins emerged from the dugout holding a lineup card filled with red lines and scribbles, it carried the same weight as a formal surrender. It was just the fifth inning when the beleaguered manager waved the white flag, a strange sight with just eight games left, and the Mets locked in a dogfight to capture one of the National League’s wild cards.

Facing a 10-run deficit, Collins pulled half his starting lineup.

But strange things happen in September. Good teams flop. Bad teams rise. And an act of concession can turn into a sign of aggression, as it did in a 10-8 loss to the Phillies Saturday, when the Mets’ desperate rally fell just short.

“If you came to the game, you got entertained anyway,” said Collins, who watched a group of September call-ups bring the Mets to the brink of a comeback.

In the ninth, the Mets got two shots to win the game with just one swing. But Lucas Duda popped up and Travis d’Arnaud grounded out, and the miracle proved to be a mirage.

The stakes are far too high to be counting moral victories, though the Mets were able to rest their weary veterans while watching their younger players gain a measure of confidence. It was barely consolation, though it was better than nothing on a night in which the Nationals officially clinched the NL East.

“We weren’t going out there and going through the motions,” said rookie Gavin Checcini, who entered in the fifth and collected a pair of run-scoring doubles, the first two hits of his big-league career. “Obviously, we’re trying to put together good at-bats and get back into the game.”

After fill-in starter Sean Gilmartin got blasted for five runs in the first and Rafael Montero followed by surrendering five more of his own, the Mets’ junior varsity pecked away at the Phillies’ porous bullpen.

But certain mountains are too high to scale, and as much as the Mets have made believers out of the most hardened cynics, they ran out of miracles.

The Mets dropped to 82-73, tied with San Francisco for the two wild cards. St. Louis is a half-game behind. The Giants and Cardinals both won.

The Mets have stubbornly kept winning games despite a starting rotation that has been afflicted by myriad ailments. The latest, a bad case of strep throat, knocked Noah Syndergaard out of commission Saturday, when he was set to face the Phillies.

The Mets trotted out Gilmartin, a long reliever who spent most of the year in the minor leagues. It was his first start of the season and it had come with almost no notice. The lefty was informed of the assignment on Friday. “Preparation wise I was ready to go out there and do my job, and I wasn’t able to,” said Gilmartin, who didn’t make it out of the first.

Gilmartin spot start ended after allowing five runs and walking three in two-thirds of an inning. Montero, Gilmartin’s replacement, surrendered four of his five runs in the fourth. When the Mets failed to score in their half of the inning, Collins pulled the rip cord.

As he scoured his options to protect a taxed bullpen, Collins heard the voice of his mentor Jim Leyland. The former manager had long ago offered sound advice.

“When you’re getting butt kicked get your star out and get those other guys in because they’re playing for something,” Collins said. “They’re playing for something, they’re playing for jobs.”

Shortstop Asdrubal Cabrera, playing through a two painful knees, was granted reprieve in the fifth. Yoenis Cespedes, Curtis Granderson and Jose Reyes also took their bows. In their place came September call-ups Ty Kelly, T.J. Rivera and Brandon Nimmo and Cecchini.

The Mets have never rallied from a deficit of more than eight runs. But by the ninth, they had given themselves a chance.

The maligned Jay Bruce, who has been banished to the bench, delivered the first pinch hit homer of his career. The solo shot off reliever Michael Mariot landed in the upper deck in rightfield and snapped an 0-for-15 stretch. It was his first homer since Sept. 4.

Two more call-ups added to the intrigue. Eric Campbell followed with an 11-pitch at-bat to work a walk and Michael Conforto also drew a free pass before Duda and d’Arnaud were retired.

On two consecutive nights, the Mets won games they probably shouldn’t have won. They wouldn’t make it a third.

“We kept chipping away and right there it was right there for us to take,” Cecchini said. “But things didn’t fall our way. But we did a great job of battling back and that’s all we could do.”

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