When Michael Wacha came to the New York Mets this offseason, no one envisioned him occupying the team’s fourth-starter spot. Alas, here we are.

In Friday night’s disappointing 4-3 loss to the Marlins, the 29-year-old right-hander looked terrific at times, but a few tough breaks and one bad pitch essentially sealed the deal on a night the Mets’ offense couldn’t get themselves going.

Wacha began his outing strong, striking out the side in the first — Jonathan Villar, Eddy Alvarez, and Corey Dickerson, all swinging — but ran into a familiar buzz saw in the second.

A Brian Anderson walk followed by a Matt Joyce infield single set the table for notorious Met-killer Francisco Cervelli, who took a Wacha offering deep to the opposite-field corner in right field, putting Miami ahead 3-0.

Magneuris Sierra drew a two-out walk later in the frame and Villar drilled an 85 MPH changeup to the wall in left-center to extend the Marlins’ lead to 4-0. Those two-out walks will always get ya…

Down 4-1, Wacha came back out swinging for the third, working around a two-out double via Jesus Aguilar, striking out two, and built off that newfound momentum.

He struck out two more Marlins in the fourth— Cervelli and Logan Forsythe, both looking — and navigated around a Sierra single and stolen base to keep New York in the game.

He picked up two more punchouts in the fifth, working around Aguilar’s second double of the game and benefitted from an outstanding range-spin-fire sequence from J.D. Davis at third to escape the jam.

Really encouraging stuff on all accounts.

That would be the end of Wacha’s evening (five innings, six hits, four earned runs, nine strikeouts, two walks; 6.43 ERA), but the guile he exhibited after digging himself in an early hole was admirable.

His pitches were working despite some poor placement early on; especially his changeup, which everyone’s favorite pitching coach Rob Friedman (@PitchingNinja) showcased on Twitter.

Wacha’s four-seamer was effective, racking up five swings-and-misses and five called strikes on 55 pitches, as was that dastardly changeup (24 pitches; three whiffs, five called strikes), and the cutter was a bonafide weapon (five whiffs, four called strikes on 18 pitches; 88.3 MPH average exit velocity).

If he can continue to keep plugging along  — especially amid trouble, but hopefully not too much — and can avoid the detrimental mistakes, Michael Wacha could end up reinforcing the back-end of this Mets rotation.

That’s an exciting development that not many of us could have anticipated.