MIAMI — Robinson Cano’s summer slumber took a hiatus Saturday night so he could enjoy a Fish dinner.

He deposited a curveball thrown by the Marlins’ Nick Anderson into the right-field upper deck, allowing the Mets second baseman to show off his almost forgotten home-run trot.

Finally.

With Cano’s go-ahead blast in the eighth inning as the difference, the Mets snapped a two-game skid with a 4-2 victory at Marlins Park that got them to .500 (since the All-Star break).

Cano’s homer-less drought had reached 71 at-bats, dating to June 17. The former All-Star has only five homers in a season that hasn’t nearly approached his expectations.

“I know in that situation I haven’t been so successful this year,” Cano said. “I’m a positive guy and the good thing about this game is you’re always going to get the same situation over and over. You have just got to stay positive and things are going to turn around.”

Cano was asked about his power outage since arriving to the Mets.

“I don’t know if you have noticed, I have been hit twice, three times in the hand this year,” Cano said. “That’s not an excuse — I am the kind of guy that, even if it’s bothering me, I would not say anything and I would never look for an excuse like that — but right now it feels really good.”

The late run support got a win for Noah Syndergaard (7-4), who allowed two earned runs on five hits with nine strikeouts over seven innings before Seth Lugo and Edwin Diaz pitched a scoreless frame apiece.

The Mets (41-51) snapped a four-game losing streak in this ballpark dating to May, when they were swept.

In the eighth, Dominic Smith delivered a single against Anderson before Cano jumped a 1-1 pitch. Cano now has two homers in his past 47 games. On the road this season, Cano was batting only .196 as play began.

“He’s working,” manager Mickey Callaway said. “That is what we ask of him right now and hopefully it will start translating into his game on the road.”

The Marlins tied it 2-2 against Syndergaard in the fourth. Harold Ramirez delivered an RBI double for the first run before Jorge Alfaro tripled in another. Neil Walker started the rally with a leadoff single and advanced to second on Syndergaard’s errant pickoff throw.

Michael Conforto’s 17th homer of the season — a two-run blast in the third — had given the Mets a 2-0 lead. Jeff McNeil doubled before Conforto cleared the right-field fence for his first homer since June 24.

Before the game, Conforto declined an invitation to grade his first-half performance, but the Mets outfielder admitted to a sense of disappointment.

“I am certainly not happy with how the first half went,” Conforto said. “I think I started the way I wanted to and started to expand my zone a little bit and got away from what was giving me success and I really just think it’s more of an approach thing and I have to adjust and really not miss the pitches I get.”

Stuck in a 4-for-40 (.100) slump as play began, Conforto was moved to the No. 2 hole in the lineup — batting ahead of Pete Alonso — with the idea that adjustment would allow him to see better pitches.

Conforto sustained a concussion in May during a collision with Cano while chasing a pop-up. But Conforto said there haven’t been lingering effects from the concussion.

“I don’t think so,” he said. “I came back from the concussion and had some success, I was swinging the bat well and doing the things I was doing earlier in the year, so I wouldn’t place anything on that. I don’t feel any differently than I did before, so I don’t think that plays into it.”