In one calendar month, the Mets have jammed in all the peaks and valleys of a full season. They have been down, and then out, wiped out by injuries and deflated by circumstance.

Their pitching, the foundation upon which they were built, has been rocked by fatigue and the aches and pains of a long summer. Team meetings were called. Losses mounted.

Then came the rise, a surge as well timed as it has been unlikely, unyielding even as pillars of the roster continue to fall. It has altered their fate and transformed time, in the same way Kelly Johnson made the final night of August feel like the first night of October.

As Johnson reached second base in the Mets’ 5-2 victory over the Marlins on Wednesday, his joy propelled his feet off the ground and his hands together. With two outs and the bases loaded, a raucous Citi Field had risen in anticipation of his three-run double, which snapped a tie and signaled the Mets’ resurgence.

“If you were scoreboard watching, you kind of know that some of the teams we’re chasing and competing against were losing,” Johnson said. “So, it just meant that much more.”

advertisement | advertise on newsday

The light of a victory was met with the darkness of despair, and as they have so many times in this turbulent month, the two forces intermingled. Terry Collins announced that second baseman Neil Walker will undergo season-ending surgery to repair a herniated disc in his back.

Walker becomes the fifth Opening Day starter whose season will end on an operating table, making the Mets’ current standing that much more remarkable. Having leapfrogged the Marlins and Pirates, the Mets stand just 1 1⁄2 games behind the Cardinals for the final wild card.

It wasn’t all that long ago that Collins called a team meeting to steady a sinking ship. But on Wednesday, he ducked his head into the clubhouse for a message that required just 30 seconds to deliver. “I told them how proud I was of the fact that they’ve hung in there,” Collins said.

The Mets began August four games over .500, then dipped to two below on Aug. 19, their bodies breaking down, their hopes for the postseason fading. But from that nadir, the Mets have won nine of 11, thrusting themselves to within arm’s reach of a playoff berth.

Bartolo Colon allowed just two runs, one earned, in seven innings. At a time when Steven Matz might be done for the season, and fatigue has rattled Jacob deGrom, the 43-year-old Colon has gone 3-1 with a 2.61 ERA in his last six starts.

Mets videos

“I’m very happy, also just pleased to be doing good work,” Colon said through a translator. “I did expect to be in the bullpen at this point.”

Addison Reed worked a scoreless eighth for the victory. Jeurys Familia closed it out for his franchise-record 44th save.

Wilmer Flores blasted a two-run homer, extending his hitting streak to nine games. In that span, he’s hitting .333 with three homers.

“We have a good bench,” said Flores, whose role will grow in prominence now that Walker is lost for the year. “Everybody that has had the opportunity to go out there has done the job.”

And then there was Johnson, the 34-year-old utilityman acquired in a trade for the second year in a row, partly for his ability to rise in big situations.

advertisement | advertise on newsday

The Mets led 2-1 but committed three errors and missed a chance to blow the game open, stalling with the bases loaded. Christian Yelich’s sixth-inning solo shot tied it, turning up the heat on the Mets.

But with two on, Johnson stepped to the plate. With increased playing time, he began the night with a .902 OPS in August, just in time for the homestretch. The stakes were not lost upon him.

He had kept his eye on the out-of-town scoreboard in leftfield. He knew that the Cardinals were losing and that the Pirates were, too. It only steeled his focus.

“You’re lying to yourself if you’re not watching,” he said. “Maybe your heart’s not in it like it should be if you don’t notice.”

Of course, he had noticed. With the victory, the Mets finished 15-14 during a turbulent August, posting their first winning month since going 15-7 in April. The uprising comes at the dawn of September, with a soft schedule loaded with also-rans.

advertisement | advertise on newsday

They are still hurt, banged-up, and on the edge of ruin. But, mostly, the Mets are somehow right in the thick of it.

“Heading into the last month, we’re in a race,” Collins said. “And there’s nothing like coming to the ballpark in the big leagues in the month of September in a pennant race.”