The Mets' Jacob deGrom pitches during the first inning against...

The Mets' Jacob deGrom pitches during the first inning against the Phillies on Wednesday in Philadelphia. Credit: AP/Matt Slocum

PHILADELPHIA — Jacob deGrom’s night ended early Wednesday. So, too, might have his chances of winning a third consecutive NL Cy Young Award.

In the Mets’ 5-4 comeback win against Zack Wheeler and the Phillies, deGrom allowed three earned runs and pitched only two innings before exiting the game because of an injury — a right hamstring "spasm," according to the Mets.

After the game, deGrom said it actually started bothering him in his previous start against the Blue Jays in Buffalo, though he didn’t tell the Mets anything until pitching coach Jeremy Hefner made a mound visit during the second inning Wednesday night.

DeGrom said he believes he still will be able to make his last two starts of the regular season — and maybe even return before Monday, which would be his next normal turn in the rotation, since he threw only 40 pitches.

"I think it’s something that we’ll be able to manage," deGrom said. "We probably stopped at the right time. It’s just day by day. What’s weird is running around, playing catch (and throwing bullpen sessions), it seems fine. Once I get to full intensity in the game is when I felt it. So hopefully it’s something we can treat and get back out there as quick as possible."

The Mets won the game on Andres Gimenez’s ninth-inning RBI single. That followed a tying two-out, eighth-inning double from J.D. Davis, who finished 3-for-4 with a homer, two doubles, three RBIs and two runs. Four relievers combined for seven innings of one-run ball.

Like deGrom, the Mets’ longshot postseason chances are day-to-day. They snapped a three-game losing streak and improved to 22-27, two games out of a playoff spot pending the results of late games Wednesday night.

"Important win in an important game, Davis said.

The abbreviated outing was a major blow to deGrom’s Cy Young case. With a week and a half left in the regular season, he has a 2.09 ERA, up from 1.67 to start the night.

That ranks fifth in the National League behind the Reds’ Trevor Bauer (1.71), the Cubs’ Yu Darvish (1.86), the Brewers’ Corbin Burnes (1.98) and the Braves’ Max Fried (1.98). Bauer, scheduled for two more starts, also leads in WHIP at 0.81.

DeGrom entered the week as arguably the leader for the top pitching honor. He already won it in 2018 and 2019 — both times getting 29 of 30 first-place votes — and has been looking to become just the third person to do so three seasons in a row, following Greg Maddux and Randy Johnson (who both went on to win four straight).

The first sign of trouble came on his first pitch. Andrew McCutchen lined a 99-mph fastball to centerfield for a single, the sort of high-quality contact that is rare against deGrom.

He escaped trouble that inning but found more in the second, when Jean Segura and Andrew Knapp led off with back-to-back doubles. Another run scored on Adam Haseley’s flyout, and still another on McCutchen’s grounder to shortstop.

That was the first time deGrom allowed as many as three earned runs in a game since Sept. 3, 2019.

"Definitely frustrated," he said. "I still felt like I should’ve been able to make pitches, and I didn’t. So I don’t think that there’s any excuse for it. I didn’t throw the ball where I needed to throw it in some situations."

In emergency relief of deGrom, recently demoted starter Michael Wacha allowed one run in four innings. That matched his average start length this season.

"Especially with a deGrom start, you don’t really expect it," Wacha said. "But some crazy things happen in this game, so you’re always ready."

Manager Luis Rojas added: "Michael was the one who gave us a chance to come back."

Wheeler held his former team to three runs in 7 1/3 innings, his first outing since partially tearing his right middle fingernail when he it got caught in his pants zipper last week. When he was pulled, the Mets completed the comeback against a bullpen that ranks as the worst in the majors.

"There wasn’t necessarily a sense of urgency," Davis said. "A calmness."

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME