When John Ricco scanned the lineup card, the longtime Mets assistant general manager hardly believed what he saw.

It was June 8, right about when the optimism of spring gives way to the harshness of summer. Of the nine players who took the field for the Mets that night in an extra-innings victory over the Pirates, only three had been in the organization last October, when they won the National League pennant.

“It just goes to show you how much things can change,” Ricco said back then, when he couldn’t have known that the Mets were just getting started.

Injuries have steadily rolled in like the tides, battering the Mets’ roster as if it were a sand castle on the shore. Forced to rebuild on the fly, they have steadied themselves through a series of low-cost moves that have put them on the path to a postseason berth.

Since rejoining the Mets in trades, Jose Reyes has rejuvenated his career and Kelly Johnson has hit for more power than ever before. James Loney went on a tear after his arrival, carrying the Mets through a vulnerable period. Rene Rivera signed a minor-league deal at the start of the season after being released by the Rays. Since then, he essentially has supplanted Travis d’Arnaud as the starting catcher.

When injuries gutted the starting rotation, the Mets relied upon their own depth to get by, thanks to the ascent of rookies Robert Gsellman and Seth Lugo.

advertisement | advertise on newsday

“We’ve got a good group in the clubhouse. It’s a new group,” general manager Sandy Alderson said recently. “Very few of our position players played in the World Series last year. Fewer and fewer of our pitchers played in the World Series. So I think it’s been a surprising transformation.”

More importantly, it’s been a successful one.

A little less than a month ago, the Mets’ odds for reaching the playoffs languished at 6.7 percent, according to FanGraphs.com, a reflection of a season undone by attrition.

By Thursday, that number had soared to 75.1 percent, with the Mets projected to finish with 86 wins. They currently own the second wild card, with a one-game lead over the Cardinals, and are within reach of the first wild card, only one game behind the Giants.

“Coming off a World Series, there is a certain part of you that says ‘we’re not living up to what everybody expects,’ ” Ricco said. “But at the end of the day, it doesn’t matter how you get there. If you’re where we are, we’ve got to keep grinding.”

Mets videos

That grind has extended beyond the field, and the Mets have benefited from the hidden work that every team must do to deal with the inevitable pitfalls of the season.

For Ricco, the turnaround has been a group effort.

Loney fell into the Mets’ laps, a big-league veteran stashed away in the minors, biding his time for the right situation. But it was manager Terry Collins who vouched for the signing of the former Dodger, acquired for cash.

The Mets knew Johnson from his time in the organization last season, bringing him back for the cost of a minor-league arm.

Soon after Rivera’s release in late March, Ricco said the catcher jumped up on the radar of senior director of pro scouting Jim d’Aloia and director of baseball operations Adam Fisher, both of whom pushed for a deal.

advertisement | advertise on newsday

Reyes’ signing arguably has been the Mets’ most important move. While Alderson seemed intrigued by the idea, opinions within the organization differed on what Reyes could bring on the field. In 46 games with them, he is batting .275 with six home runs, 10 doubles, three triples and eight stolen bases.

Triple-A manager Wally Backman, who parted ways with the organization this week, had been one of those to insist that Reyes was worth a shot. He was impressed by what he saw from him in Las Vegas during a rehab assignment just before his release by the Rockies.

The Mets added Gsellman and Lugo to the 40-man roster last winter, shielding both from being chosen in the Rule 5 draft. In the absence of Jacob deGrom and Steven Matz, they have saved the rotation.

“We haven’t done anything yet,” Ricco said. “If you ask me this after we make the playoffs, that’s different. But I will say: just even getting ourselves to this point, given the circumstances, is somewhat rewarding.”