Two batters in and the Phillies were one run down Sunday night at Citizens Bank Park. You knew, too, that ESPN had to love the way it happened. Rookie phenom Pete Alonso stepped to the plate and planted a first-pitch fastball deep into the left-field stands for his 43rd home run of the season.

Only Mike Trout and Cody Bellinger have as many.

This, it seemed, was going to be a wild night with the national television audience also getting the theater of Mets fans chanting for their favorite team as it attempted to complete a three-game sweep.

Instead, Zach Eflin and Hector Neris tamed the Mets the rest of the evening and Scott Kingery delivered a three-run double in the bottom of the eighth inning to provide the Phillies with a crucial 5-2 win over their National League East rival. The victory allowed the Phillies to close to within 2 ½ games of the Chicago Cubs for the NL’s second wild card, and it assured that they would win the season series against the Mets for the first time since 2011.

After Bryce Harper had advanced to third and Rhys Hoskins to second on a fly ball to center field by Brad Miller, the Mets opted to intentionally walk Cesar Hernandez.

“I understand there are some pretty significant splits there,” Phillies manager Gabe Kapler said. “I understand the move.”

Hernandez was 4-for-10 with three walks against Mets reliever Jeurys Familia. Kingery was hitless in four at-bats with a strikeout against him.

“It’s part of the game to put the double play in order, but it gives you a little extra motivation to want to get a big hit there, so you go up there with your plan and you try to execute it,” Kingery said.

The plan?

“He’s a sinker-ball pitcher and he’s trying to get you to chop the ball on the ground,” Kingery said. “My whole thing was to get the barrel under the ball and get it lifted.”

It was executed perfectly much like Eflin’s plan on the mound as the right-hander gave the Phillies seven sensational innings in his third start since returning to the rotation. He had said upon his return that he intended to throw more two-seam sinkers than four-seam fastballs and he stuck to that formula against the Mets. He threw his two-seamer 39 times compared to just 10 four-seam fastballs among his 84 pitches. It was his best start since June 12, when he held Arizona to two runs over eight innings.

After surrendering the first-inning home run to Alonso, he allowed just two more hits and three more baserunners. Alonso singled to lead off the fourth but was erased on a 4-6-3 double play. After Wilson Ramos extended his hitting streak to 25 games on a double that scooted past Miller at third, Joe Panik walked, but Eflin retired Amed Rosario to escape the inning unharmed.

Eflin, who lowered his ERA to a respectable 4.33 for the season, pitched perfect innings in the second, third, fifth, sixth and seventh.

But it was an armchair manager’s dream from there.

With Eflin’s pitch count at 84 and Adam Haseley at second base following a leadoff double in the bottom of the seventh, Kapler opted to pinch-hit for his pitcher. Jay Bruce moved Haseley to third with a grounder to first, but the Phillies failed to get the run home and now it was a bullpen game.

Eflin said he had been “nursing some oblique tightness and that started creeping up on me kind of in the fifth, sixth and seventh, so I respected the decision Kap made” to remove him.

Soon, however, it would be a tie game.

Reliever Mike Morin gave up a leadoff single to Todd Frazier and walked pinch-hitter Brandon Nimmo before pinch-hitter Luis Guillorme moved both runners with a sacrifice bunt.

Kapler went to Neris in an attempt to get a five-out save with the top of the Mets’ order coming up. Neris kept the tying run from scoring when he got Jeff McNeil to ground into a fielder’s choice that ended with pinch-runner Rajai Davis being thrown out at home plate. But Neris walked Alonso and ball four was a spiked splitter that got past catcher J.T. Realmuto, allowing Nimmo to score the tying run.

The “Let’s go Mets” chants were ringing through Citi Field South once again just as they had when Alonso hit his first-inning homer.

The Phillies, however, had an answer this time. Neris escaped the eighth without any more damage and Harper led off the bottom of the inning with a single off lefty Daniel Zamora.

Hoskins drew a walk and Miller, who had homered in the second after being a late lineup replacement for Jean Segura, delivered a productive out with a fly ball to center field. It advanced both Harper and Hoskins and, after Hernadez was intentionally walked, Kingery lined a 1-0 fastball into left-center field for a three-run double.

The Mets fans were silenced and the Phillies were a game closer to the second wild card than they had been at the beginning of the day.