MIAMI — They’ll always have Little Havana.

It took only three months for the Mets to again win a road series, but they got there Sunday with a near-complete performance against the NL East basement dwellers.

One small step for the Mets, but no giant leap of faith yet with their 6-2 victory over the Marlins to take two-of-three games in the series.

The Mets’ previous road series victory had occurred April 1-3, when they swept the Marlins here. Since then the Mets were 0-10-3 in road series.

“It feels like more than a few months,” manager Mickey Callaway said. “But it’s a good way to start the second half: we won a series and we have to keep it going.”

Robinson Cano had a second straight big offensive performance, delivering four hits including a solo homer in the seventh. A night earlier, Cano smashed a two-run homer in the eighth that scored the go-ahead runs. Over his past 11 games, Cano is 17-for-43 (.395). The four-hit game was the 37th of his major league career.

Seth Lugo and Robert Gsellman combined for 2 ²/₃ innings, allowing one run after Jeurys Familia stumbled in the seventh.

Jacob deGrom was removed after five innings in which he allowed one run on six hits with three walks and six strikeouts. It was the right-hander’s first start of fewer than six innings since May 27 in Los Angeles.

“Today was a battle,” said deGrom, who was removed after 94 pitches. “First inning I felt good, but from the second inning on it felt like I was flying open a little bit, having a hard time commanding the baseball. Overall I was able to keep us in a position to win that baseball game.”

DeGrom said he avoided the inclination to ask for another inning on a day he knew he was spent.

“There I was thinking, ‘What’s the upside of this?’ ” deGrom said. “I was a little bit tired, battling with my mechanics out there and I just was honest with them today.”

The Mets scored twice in the fourth to give deGrom a 3-1 lead. After loading the bases with nobody out, Adeiny Hechavarria’s grounder to shortstop brought in a run, as Miguel Rojas double clutched while initially looking toward the plate. With two outs in the inning and the bases loaded, Michael Conforto hit a ground ball into the shift, but beat Starlin Castro’s throw to first base for an RBI single.

Rojas’ RBI single in the second got the Marlins their run against deGrom, who walked two batters in the inning. Jeff McNeil threw out Curtis Granderson attempting to score on Rojas’ single, ending the inning.

“Almost 100 pitches in five innings, I didn’t feel that comfortable out there,” deGrom said. “I was fortunate enough these guys put up some runs for me.”

McNeil’s homer on the first pitch of the game got the Mets started. Pete Alonso was robbed of a homer later in the inning when Granderson reached above the left-field fence to snare a towering drive.

Only adding to McNeil’s legend was his prediction to Callaway before the game he would homer on the first pitch. The manager had told McNeil he would like to see an 11-pitch at-bat, culminating with a homer.

“I just laughed and said I would do it on the first pitch,” McNeil said.

That prediction was fine with Callaway, as long as it was completely correct.

“I said, ‘It better be a homer,’ ” Callaway said. “And he made it a homer, so he is pretty much doing whatever he wants to do.”