MLB

After comedy of errors, Nieuwenheis’ walk-off HR gives Mets something to celebrate

For nearly nine innings, the Mets had come out on Father’s Day and put on a Little League display. They couldn’t field, couldn’t hit, couldn’t compete.

Then Kirk Nieuwenhuis turned all that around, the same way he turned around Carlos Marmol’s fastball for a three-run, walk-off homer and a 4-3 win.

Nieuwenhuis crushed a no-doubt shot off the second deck in right, capping a four-run ninth and avoiding an error-filled sweep at the hands of the Cubs. And as he leapt high into the Mets’ mosh pit at home plate, few could begrudge them celebrating something all too rare in Citi Field these days: victory.

“I can’t really describe it. It was great, my first [walk-off homer] in the big leagues, so it was a lot of fun,’’ said Nieuwenhuis, smeared in the face during postgame interviews with a celebratory apple pie. “It feels good for sure. It was a real blessing to get this right before the road trip, get some momentum.’’

It was their first walk-off homer trailing by two runs since Aug. 30, 1992. And for a team that had lost 10 of its last 12, a struggling bunch that’s thrown the ball away three times for two errors in the fifth inning alone? It was stunning.

“If we can’t use this as a spark, I don’t know what else we can do. Those are big at-bats by guys who are struggling. I hope that gets us going,’’ Terry Collins said. “It goes to the old saying, and I know guys talk about it: You got to play nine innings, you got to play 27 outs.

“But we’re going to get on that plane with smiles on our faces. We’re going to go into [today] with an upbeat attitude … with some excitement. It’s a great positive day for us. … My dad (yesterday) morning asked me for one thing for Father’s Day, and that was a win. I said I’m not a father but I need one, too.’’

Despite a solid outing by starter Jeremy Hefner (six innings, three runs, one earned), they were on the verge of losing their fourth straight, and getting swept at home by the Cubs for the first time in 22 years.

In the fifth, David Wright’s two-out throwing error over the head of first baseman Daniel Murphy sent Nate Schierholtz and Starlin Castro to second and third, and Murphy’s wide throw home plated both runners for a 3-0 deficit. Shortstop Omar Quintanilla added a wild throw home just for comedic value.

But Carlos Torres — just called up from Triple-A Las Vegas — David Aardsma and winner Bobby Parnell (5-3) pitched four shutout frames to give the Mets a chance, and they cashed in with a pair of homers in a four-run ninth.

With closer Kevin Gregg having pitched four straight games, Cubs manager Dale Sveum turned to Marmol (2-4), and the Mets strafed him. Marlon Byrd hit a 1-1 pitch out to left-center for a solo shot, and after Lucas Duda walked and John Buck singled, Nieuwenhuis smashed a 94-mph fastball.

“To come through in the ninth and spark the team was much-needed, because we needed something,” Byrd said. “We’ve been scuffling lately; everybody knows that. You’re waiting for something to happen and we got it going.”

“For us to be able to rally in the ninth hopefully that buys us a little momentum, a little bit of confidence moving forward,’’ said Wright. “Right now a win’s a win, and we’ll take it any way we can get it.’’

brian.lewis@nypost.com