The New York Mets (37-41) lost a heart-breaker to the Chicago Cubs (42-35), 5-3, just missing out on taking 3-out-of-4 from the current NL Central leaders (box score).

Seth Lugo, clearly not at his best, allowed a go-ahead, three-run home run to Javier Baez in the eighth inning, presumably sending the Mets to Philadelphia with a bad taste in their mouths.

Pete Alonso connected for his 27th home run of the season, setting a new franchise record for homers by a rookie (Darryl Strawberry, 26; 1983), Todd Frazier went 2-for-4, and Tomas Nido hit his third home run of the year in the losing effort.

Jacob deGrom gave up two runs on eight hits with nine strikeouts and no walks over six innings (97 pitches; 67 strikes). SNY replays (video via Mike Mazzeo of Yahoo) showed deGrom in apparent discomfort during the sixth inning, which could have led to his early exit.

DeGrom racked up 22 swings-and-misses (15 on his slider, alone) and registered an average exit velocity of just 87.5 MPH on 15 balls in play. Vintage, deGrom; hopefully, he’s OK.

Pitching

Jacob deGrom pitched a perfect first inning, picking up right where he left off after his 8.1-inning, 10-strikeout gem versus the Braves on Tuesday.

DeGrom nearly escaped a two-on, none-out jam (back-to-back singles from Jason Heyward and David Bote) before Cole Hamels‘ two-out RBI single in the second, giving Chicago an early 1-0 lead.

Jake struck out Victor Caratini (slider) to end the second, then got Kyle Schwarber (changeup) and Kris Bryant (slider), both swinging, in a dominant third inning (eight pitches, seven strikes).

Baez struck out again to lead off the fourth, but Heyward ate up Rosario with a sharply-struck infield hit. Caratini lined a single into center field, moving Bote to second with two outs, but deGrom struck out Hamels to escape the mini-jam.

Bryant hit a two-out ground-rule double in the fifth and came around to score on Anthony Rizzo‘s base hit into left field to cut the Mets’ lead to 3-2. J.D. Davis gunned down Rizzo at second to end the frame after the run had scored.

Baez finally solved deGrom with a leadoff single in the sixth, but Tomas Nido fired a strike to catch Baez stealing second and deGrom struck out Heyward and retired Bote to work around the baserunner.

After 97 pitches (67 strikes) and a 3-2 lead, deGrom was pinch-hit for in the top of the seventh (Adeiny Hechavarria), ending his afternoon after six innings, allowing two runs on eight hits with nine strikeouts and no walks, lowering his ERA to 3.25.

Seth Lugo gave up a hard-fought single (four two-strike foul balls) to Caratini to start the seventh but struck out Daniel Descalso on a 95 MPH heater and got Albert Almora, Jr. to ground into a 5-4-3 double play to escape unscathed.

Lugo allowed a leadoff single to Schwarber in the eighth and, with one out, Mets manager Mickey Callaway likely stuck with his right-hander to face Rizzo (3-for-7, one homer versus Lugo in his career) out of necessity since the Mets had no available left-handers in the bullpen on Sunday.

After Rizzo drew a five-pitch walk, at 42 pitches on the afternoon, and ahead 0-2 on Javy Baez, Lugo gave up a mammoth, opposite-field three-run homer to put the Cubs ahead, 5-3. Then Callaway pulled him, double-switching Jeff McNeil into the game, as well.

Robert Gsellman entered, allowing a double to Heyward and walking Bote before striking out Caratini and retired Addison Russell to limit the damage.

Offense

Continuing his torrid streak over this road trip (9-for-20 over six games heading into Sunday), Amed Rosario led off the game with a softly hit single off Cubs left-hander Cole Hamels, though he was erased on Pete Alonso’s 6-4-3 double play.

Todd Frazier lined a single into left field to start the second, but Robinson Cano grounded into a 4-6-3 double play of his own.

Tomas Nido drew a leadoff walk in the third — his first of the year — and advanced to second on deGrom’s perfectly-executed sacrifice bunt, but Rosario went down swinging at a high Hamels cutter to end the threat.

Pete Alonso broke the Mets franchise rookie single-season rookie home run record with his 27th home run of the season, a 110 MPH, 454-foot shot out to right-center, tying the game at one in the top of the fourth.

Frazier collected his second hit of the game in the next at-bat with a one-out double off the top of the ivy but neither Cano or Carlos Gomez could bring him home.

Nido hit his third home run of the season leading off in the fifth, taking an outside-half cutter from Hamels 428 feet into left field, giving the Mets a 2-1 lead.

Juan Lagares followed him with a first-pitch double down the right-field line and deGrom helped his own cause with an RBI single up the middle to put the good guys ahead, 3-1.

With deGrom and Alonso (walk) on base and Frazier at the plate with two outs later in the fifth, Pete was picked off at first by a perfect snap throw via Caratini to end the frame.

Alonso’s seventh-inning walk was the only baserunner the Mets managed versus the Cubs bullpen from the sixth on.

On Deck

The Mets head to Philadelphia to start a four-game series at Citizens Bank Park on Monday at 7:05 PM ET. Steven Matz (5-5, 4.28 ERA) will square off against Phillies right-hander Zach Eflin (6-7, 2.83 ERA).

The game will be televised on SNY and broadcast on WCBS 880 AM.