The curtain had closed. Two more games were in the books. Thousands of fans were walking toward the exits at Citi Field, filling the concourses with a familiar tune. “Let’s go Mets! Let’s go Mets!” bellowed in the most optimistic octave of the year.

Queens was quiet an hour earlier. Then came swing (J.D. Davis) after swing (Michael Conforto) after swing (Pete Alonso), transforming a possible loss to the worst team in the National League into one of the most thrilling victories of the season.

Like that, Mickey Callaway was managing a winner.

On a Monday which began with Jacob deGrom helping the Mets complete a nearly 10-week climb to reach .500, the suddenly surging franchise became a winning team for the first time since May 2, capturing a thrilling 5-4 comeback victory — on a trio of solo, seventh-inning homers, including back-to-back, two-out shots by Conforto and Alonso — over the Marlins to sweep the doubleheader.

“We still have a long, long way to go, but it’s fun,” Callaway said following the best day of his two-season tenure. “The fans are absolutely amazing out there, and hopefully we’ll be selling out every game for the next two months, and do something special.”

When the Mets dropped their first game after the All-Star break in Miami, they were buried 11 games under .500. Just over three weeks later, the former laughingstocks were cackling with delight, becoming just the third team in franchise history to reach .500 after falling at least 10 games under, according to Elias Sports Bureau.

After Conforto and Alonso drilled their dramatic blasts — giving the Mets their 11th win in 12 games, and a major league-best 17-6 record since the All-Star break — the supposed deadline sellers were just 2 ¹/₂ games out of a wild-card spot.

“I’m proud of our guys for fighting back,” said Alonso, whose 35th homer marked his first in 10 games. “Getting to this point has been really tough, but now, anything can happen.

“I’m just really happy I could contribute today because this past month has been kind of rough, but ever since Mercury came out of retrograde, I think I’m OK.”

DeGrom (7-7) set the stage by dominating the day session, allowing two runs, and driving in a pair, in a 6-2 win.

Conforto opened the nightcap with a two-run single, but the Marlins wrestled back the lead, 4-2, on Curtis Granderson’s two-run, fifth-inning double.

Then came an inning which electrified Queens, which made this run feel like more than taking advantage of a soft schedule, which made the season feel like a scene ripped from four years ago.

Davis’s 12th homer, off of Jeff Brigham, opened the seventh. Two outs followed. Then, Conforto destroyed a 3-2 fastball deep into the upper deck in right field, tying the game with his 23rd homer of the season.

Alonso followed, returning home from Sunday’s mental breather batting .151 since winning the Home Run Derby, without a home run since July 26. Facing a full count, the All-Star emerged with the biggest hit of his career, lining a homer to left field, as 29,000 and change made every seat sound filled.

“It was about as electric as I’ve ever seen it here,” said Conforto, who starred in the 2015 World Series. “The feeling of this hot streak, it does feel similar [to 2015], but I wouldn’t compare the two. Each season is different, and has its own stories. So, hopefully we can find our way in the playoffs again.”

Hope is back. Belief, too.