NEW YORK — Kyle Schwarber hit one of the Cubs’ three homers against a stunned Noah Syndergaard, and the Cubs built an early nine-run lead before closer Craig Kimbrel held off the New York Mets in the ninth inning for a 10-7 win Wednesday night.

Nicholas Castellanos and Ian Happ also took Syndergaard (9-7) deep in the worst start of the 2016 All-Star’s career. Syndergaard allowed 10 runs and three homers — both his most in the majors — and was pulled after three miserable innings the day before his 27th birthday.

Kimbrel entered with a three-run lead and let his first two batters reach in the ninth. He escaped a dicey 3-0 count against red-hot Amed Rosario with a fielder’s choice, struck out Juan Lagares and got Todd Frazier to fly out for his 12th save.

The Cubs climbed to within two games of the NL Central-leading Cardinals, who lost 4-1 to the Brewers. The Cubs remained two games ahead of the Phillies for the second NL wild card and extended their edge over the Mets to four.

New York has dropped five straight, all at home, and lost steam on an improbable second-half surge into the playoff chase. The Mets will try to avoid a three-game sweep Thursday night before traveling to Philadelphia for a pivotal three-game series this weekend.

Jeff McNeil ended a rare 0-for-9 slide with a two-run homer, going back-to-back with J.D. Davis in the fifth. Those shots sparked a five-run inning that chased Cubs starter Kyle Hendricks. McNeil had three hits and was a triple shy of the cycle.

The Mets put runners on in the sixth, seventh, eighth and ninth, but the Cubs bullpen limited the damage. Kyle Ryan (4-2) got the win.