Mets starting pitcher Jacob deGrom takes his jacket off in...

Mets starting pitcher Jacob deGrom takes his jacket off in the dugout before an MLB game against the Diamondbacks at Citi Field on Sunday. Credit: Kathleen Malone-Van Dyke

From flawless game to the perfect nightmare.

As usual with the Mets, joy and pain are always a heartbeat away. And so it went Sunday for Jacob deGrom, whose premature exit after throwing two warm-up pitches before the top of the sixth inning made a solid 4-2 victory over the Diamondbacks (and three-game sweep) at Citi Field feel very destabilizing.

Shortly after deGrom’s departure, the team announced that he had left for precautionary reasons because of "right side tightness" — the same ailment that caused him to be scratched from his previously scheduled start Tuesday in St. Louis.

That was before an MRI revealed the more specific lat muscle inflammation, but deGrom wasn’t worried at the time, saying the problem was in a "good spot," relatively speaking.

Not putting him on the 10-day injured list seemed overly ambitious at the time, but for a while Sunday, deGrom appeared to be OK — until he wasn’t.

The Mets tried to stay upbeat after the game, but according to manager Luis Rojas, the spot had changed. It was a new spot now, more in deGrom’s lower back region, and Rojas was inclined to believe this location meant no connection to the previous injury — at least until Sunday’s MRI results came back.

"No pain whatsoever — just tightness," Rojas said. "That’s what he told our trainer."

The Mets were in a similar situation only six days earlier when deGrom first alerted them to the issue but downplayed the severity. Encouraged by their ace, they green-lighted deGrom for Sunday, but the first turn back is always a hold-the-breath moment. Either the optimism is warranted or someone has made a terrible mistake.

Think Noah Syndergaard’s torn lat muscle in 2017, a case in which the Mets seemed to prefer ignorance over due diligence.

On Sunday, deGrom’s outing deteriorated without warning. He retired the first 12 hitters for only the third time in his career — amazingly — and yet had only five strikeouts during that stretch, an anomaly for such a prolific strikeout machine.

But just when everyone was starting to sweat no-hit jinxes, deGrom began leaking oil in the fifth inning, with a leadoff walk, a double and another walk before catching his breath by getting a double-play grounder.

A third walk in that same inning — deGrom had only four total in his previous five starts — was the equivalent of seeing the Mets’ ace spontaneously combust on the mound.

DeGrom had been ridiculously economical to that point, needing only 39 pitches through four perfect innings. To witness him suddenly being mortal was a red-flag moment for the two-time Cy Young Award winner despite passing a systems check in a dugout conversation with pitching coach Jeremy Hefner immediately afterward.

"What he told Jeremy was that he was a little bit out of whack because of the days without pitching and having to do the routine all over again to come back for today," Rojas said. "He said he was trying to find himself out there, but nothing more than that."

Maybe not, but deGrom didn’t stay silent for much longer, and he noticeably shook his head in annoyance after those couple of warm-up pitches in the sixth, signaling for trainer Brian Chicklo. Soon after, there was a summit on the mound. Rojas and the infielders circled deGrom, who then trudged to the dugout, head bowed, before disappearing down the steps.

DeGrom wasn’t available after the game, as he probably was in an MRI tube around that time. But the fact that he didn’t put up much of a protest suggests he realized the tightness was not something he should power through.

Pitchers deal with minor discomfort frequently. It’s part of the gig. And for someone like deGrom, who regularly throws 100 mph, the stress on his slender frame — even with his superior mechanics — must be considerable.

That’s always the worry with deGrom. He’s so freakishly brilliant that what he’s able to do consistently doesn’t seem within the range of human biology.

In surrendering the one run in five innings, he saw his ERA creep up to 0.68. Lost in all the drama was that deGrom actually got credit for the win.

But this isn’t about Sunday. It’s mapping out the next 4 1/2 months for the Mets, and no one dares to imagine that without deGrom at the front of their rotation.

The Mets delivered an inspired effort Sunday in completing their weekend sweep of the Diamondbacks, with Michael Conforto’s spectacular wall-crashing catch, another shutdown bullpen performance and even deGrom helping to generate offense — yet again — by legging out a bunt single and coming around to score in the third inning.

The irony is that deGrom’s all-around excellence could have contributed to this subsequent flare-up knocking him off the mound. Sometimes he may be too good for his own good, and that can be scary for the Mets.

"We’re hoping for the best," Conforto said. "Jake’s very careful. He’s not going to pitch on anything that doesn’t feel right."

The Mets just need to hear that nothing is seriously wrong.