HIT AND MISS: Kirk Nieuwenhuis leaps into Scott Hairston’s arms in celebration after hitting an RBI single in the bottom of the ninth to give the Mets a 3-2 victory and a series sweep over the Marlins. But the news was not all good, as Mike Pelfrey learned he likely will have season-ending elbow surgery. Photo: Getty Images

In typically maddening fashion, the Mets continue to follow the terrific with the terrible, to temper good news that makes them celebrate with terrible news that leaves them somber. Yesterday, that meant following a come-from-behind, sweep-clinching 3-2 win over Jose Reyes and the Marlins with the likely loss of Mike Pelfrey for the season.

Starting nine homegrown players for only the third time in their history (and the first time since Sept. 19, 1971, according to the Elias Sports Bureau), the Mets saw Justin Turner work Heath Bell for an impressive 13-pitch, bases-loaded walk to drive in the game-tying run in ninth, and Kirk Nieuwenhuis stroke a two-out walk-off RBI single to win it.

“Any time you have that many players from one farm system, playing with those guys down in the minor leagues and seeing them up here is really cool,’’ said Nieuwenhuis. “Beating those guys and heading into Colorado, it gives us momentum.’’

As his hit sliced away from right fielder Giancarlo Stanton, Nieuwenhuis rounded first base with his right fist thrust aloft, and jumped into the arms of Scott Hairston as the Mets celebrated their sixth come-from-behind win of the year.

“In the ninth inning, that situation, that’s what every kid dreams about, but they probably dream about hitting it out of the park, not drawing a walk,’’ said Turner.

“Everyone believes in each other. Everyone knows we’re in this locker room for a reason: We can all play. They made a big deal of having nine homegrown players on the field to start the game. It’s nine pretty good players that a lot of clubs would be happy to have on their team.’’

The homegrown Mets managed a statement sweep against the big-spending Marlins, who watched their $58 million pitcher Mark Buehrle lose Wednesday, their $27 million closer Bell implode yesterday and Jose Reyes, their $106 million prized shortstop, who was booed lustily by bitter Mets fans, go hitless yesterday and just 1-for-12 in the sweep.

“[Owner] Jeff Wilpon was in there and I told him he should be very proud, to see nine homegrown players out there,” manager Terry Collins said. “And when that game started, there were 10: Jose Reyes was in the batter’s box. That is a tribute to the scouts and the player development here.

“We played very good and it starts on the hill. We got great pitching this series, tremendous pitching. … Jon [Niese] pitched really well. He deserved a [win], but he did what a starter is supposed to do and that’s keep you in the game with a chance to win.’’

Niese held Miami to just four hits and two runs in a season-high seven innings. But he was losing a pitcher’s duel with Ricky Nolasco (one run on five hits in seven innings) and the Mets trailed 2-1 going into the bottom of the ninth before rallying.

David Wright drew a leadoff walk, and Ike Davis and Josh Thole followed with one-out walks to load the bases. Turner fell behind 0-2 but fouled off seven pitches from Bell (0-3) while working the count full. His walk tied it, and after Hairston grounded into a force at the plate, Nieuwenhuis’ slicing single made a winner of Ramon Ramirez (2-1).

“[It was] beautiful. Turner’s at-bat was tremendous. It was so fun to watch. It’s just great,’’ said Niese. “I was in here watching on the TV, but it was nerve-wracking. My hands are numb from clapping so hard.’’

General manager Sandy Alderson added: “It was an unusual circumstance with all the players in the lineup being homegrown, and a testament to the players that were signed and developed under [former GM] Omar [Minaya].’’