NEW YORK — Whatever Jacob deGrom meant, it didn’t look good.

Pulled after another shaky start, deGrom was headed down the dugout tunnel toward the clubhouse when he signaled for Mets trainer Ray Ramirez to follow him.

“Everything’s fine,” the shaggy-haired ace insisted Thursday night following New York’s 6-4 loss to Miami.

“I was frustrated with how I pitched. I didn’t feel great out there tonight. I just wanted to talk to Ray,” he said.

The Mets fell two games behind idle St. Louis for the second wild-card spot, with the Marlins another game back.

DeGrom (7-8) got seven days between starts because the Mets worried he was fatigued, but he still struggled.

DeGrom gave up three runs, six hits and four walks in five innings. He has lost three straight starts, tagged for a total of 16 runs, 31 hits and six walks in just 14 2/3 innings.

“When I walk four guys, I can’t throw the ball where I want right now. I got to figure that out. I’ll take this time in between this next one and try to get things right,” he said.

“Just kind of out of sync out there. I waved him in to talk to him but there’s nothing wrong,” he said.

Mets manager Terry Collins said he hadn’t noticed deGrom signaling to the trainer, adding, “What you guys just informed me about is a little troubling to me.”

But Collins could tell something was off.

“It’s quite obvious when you walk four guys. He was behind in the count, he had a lot of pitches in five innings. That’s just not Jake. That’s the thing we’ve been watching is his command is not what it has been. That’s been the big issue,” he said.

Christian Yelich showed off his bat, legs and glove, capped by hitting a three-run homer that helped the Marlins end their season-worst five-game losing streak.

Yelich homered for the third straight game, singled twice, drove in four runs and stole two bases. He made a dashing, diving catch in center field with the bases loaded and two outs — that made up for him later dropping a routine fly for an error.

Jose Urena (3-5) and the Marlins averted a four-game sweep. Down 6-1, the Mets made it close, boosted by pinch-hitter Asdrubal Cabrera’s two-run homer in the ninth off Fernando Rodney.

Urena allowed four hits, including Jay Bruce’s 29th homer, and one run in six innings.

Bruce hit an RBI single in the eighth and the Mets loaded the bases with no outs. But September call-up Michael Conforto grounded into a double play and pinch-hitter Yoenis Cespedes struck out.

It was scoreless in the second when the Mets loaded the bases with two outs. DeGrom hit a liner up the middle that Yelich, playing shallow for the pitch, rushed in to grab off the grass.

Yelich hit a three-run drive for his 18th homer in the seventh.

WELCOME

RHP Fernando Salas pitched a scoreless inning a day after the Mets acquired him from the Angels for a minor leaguer. The 31-year-old reliever was 3-6 with six saves and a 4.47 ERA in 58 games, and had pitched well since the All-Star break. He got to wear his favorite No. 59 and rookie pitcher Josh Smoker switched to 58. Smoker gave up Yelich’s home run.

TRAINER’S ROOM

Mets: Cespedes and Cabrera didn’t start after it rained most of the afternoon. They have been banged up lately and “I don’t need them slipping on the turf,” Collins said. … 2B Neil Walker said he needed season-ending surgery for a herniated disk.

UP NEXT

Marlins: RHP Andrew Cashner (4-10, 4.73) is 0-3 in five starts since Miami got him in a trade with San Diego. He’ll pitch Friday night at AL Central-leading Cleveland against Carlos Carrasco (9-7, 3.23).

Mets: RHP Noah Syndergaard (12-7, 2.56) is 3-0 with a 1.31 ERA in his last three starts going into Friday night’s opener of a three-game series against NL East-leading Washington. A.J. Cole (0-1, 4.97) pitches for the Nationals.