MIAMI — The Mets took a chance on Jose Reyes in hopes of recovering even a portion of the energy that he had once brought here. Time had changed him, of course, robbed him of some flash and foot speed.

He was arrested for domestic violence, then suspended, and ultimately released.

But the Mets saw the way he could still whip the bat through the sone, and the throwing arm that he had flashed for years in the field. They hoped that he would still have nights when he might be that familiar dynamo, a firestarter at the top of the order, just as he was last night in the Mets’ 5-3 win over the Marlins.

“He’s like a can of Red Bull bottled up like a human being,” Logan Verrett said, “which is something we were missing.”

For the first time since rejoining the Mets, Reyes collected three hits in a game. His efforts led to three runs, including the go-ahead tally in the seventh to give the Mets the lead after losing it the previous inning.

advertisement | advertise on newsday

“I hope he has a lot more of them like that,” manager Terry Collins said. “That’s what we envisioned.”

Yoenis Cespedes, back in the lineup after he was given a day off to rest his banged-up quad, knocked in a pair of runs with a pair of sacrifice flies. Reyes drove in another with an RBI single. In the ninth, James Loney’s two-run homer off reliever Fernando Rodney landed in the upper deck in rightfield, providing ample breathing room for closer Jeurys Familia.

Meanwhile, the Mets got enough out of Verrett, the spot starter who has been forced into the rotation. He departed after 5 1⁄3 innings, after allowing a game-tying two run shot to Christian Yellich. But Verret’s primary objective was completed: he kept the Mets in the game.

Reliever Hansel Robles logged 1 2⁄3 innings of scoreless relief. It came ahead of setup man Addison Reed, who worked a clean eighth. Familia shut the door in the ninth for his 34th save of the season and 50th straight regular-season save dating back Aug. 1, 2015 — the fourth longest streak in baseball history — though he again had to work for it.

Cespedes misplayed a Yelich drive to left, entering into a slide only to whiff on the ball, which went down as a leadoff double. Three batters later, pinch-hitter Martin Prado delivered a two-out RBI single, bringing Adeiny Hechavarria to the plate as the winning run. But he grounded out, ending the scare.

Mets videos

The Mets (51-44) picked up a game on the Marlins (52-44). Miami had begun the day 1 1⁄2 games clear of the Mets for both the second wild card spot and second place in the NL East. The Mets also gained a game on the first-place Nationals, closing to within five.

It began with Reyes, who led off the game with a double, and then swiped third base before scoring on a sac fly. It was the first of four times he reached base against the Marlins, the team that once lured him as a free agent only trade him away.

“I’ve waited for this for a little while,” Reyes said. “It’s always good to set the tone for the guys behind me.”

Since his arrival on July 5, Reyes insisted that comfort would come over time. With more at-bats, he would look more like his old self.

He began the day hitting .213, though seven of his 10 hits in his first 47 at-bats were for extra bases. He ended it with his first three-hit game since Sept. 29.

advertisement | advertise on newsday

Said Reyes: “I never stopped working, I never stopped believing in myself and what I can do on the field.”