PHILADELPHIA — Pete Alonso capped New York’s six-run eighth inning with a three-run double, and the Mets used a defensive meltdown by Philadelphia and a replay reversal to beat the Phillies 8-7 on Sunday night.

Michael Conforto snapped a tie with a bases-loaded walk against José Alvarado, driving in Jose Peraza, and Alonso followed with a liner off David Hale that split the gap in right-centre and went all the way to the wall for an 8-4 lead.

“I don’t know if that’s a season-defining game tonight, but it is a momentum shifter,” Alonso said. “We got the ball rolling in the right direction. It was a gritty win."

Philadelphia got a run back in the ninth on Roman Quinn’s RBI triple. After a Matt Joyce walk, Rhys Hoskins hit an opposite-field drive off Edwin Díaz that was initially ruled a tying three-run homer first base umpire Jose Navas.

A replay review showed the ball hit the top railing of the fence on the out-of-town scoreboard in right, never clearing the wall itself. Hoskins was placed at second with a two-run double.

“They had clear evidence to turn it over. That’s what it was,” Hoskins said.

Díaz then departed with a back injury and Jeurys Familia struck out Bryce Harper on a high fastball, earning his first save.

Didi Gregorius and Andrew McCutchen homered for Philadelphia, and Hoskins had two hits and two RBIs. But Hoskins also had a memorable defensive miscue that led to a run for New York.

After Gregorius’ three-run shot lifted the Phillies to a 4-2 lead in the sixth, the Mets went ahead to stay in the eighth.

Kevin Pillar sparked the rally with a leadoff drive off Brandon Kintzler (1-1). Jonathan Villar then singled and James McCann flied out.

Peraza followed with a pinch-hit smash that trickled off Hoskins’ glove at first and into short right field. Villar pulled into third, and then accelerated home with the tying run when he saw Hoskins casually flipping the ball to second baseman Nick Maton in frustration.

“When I got to third, I saw what he did and I thought that I could go and steal home,” Villar said.

For the Phillies, it was another in a series of defensive lapses that have cost them in multiple games this season.

“I have to make a play in the eighth,” Hoskins said. "It is a mental error that can’t happen at any point in the game. Certainly not late in the game. We know that Villar is an aggressive baserunner. I have to run into the infield, get time and live for another day.”

Manager Joe Girardi then summoned Alvarado, who is appealing a three-game suspension handed down by Major League Baseball for a bench-clearing incident Friday night resulting in an exchange of words with Mets outfielder Domonic Smith.

Alvarado didn’t record an out, allowing a single to Jeff McNeil, a walk to Francisco Lindor and then the bases-loaded walk to Conforto.

“He’s worked a lot and it could have been the emotions of the situation that got to him,” Girardi said. “We haven’t seen that since he’s been here.”

With Philadelphia trailing 2-1 with one out in the sixth, Gregorius drove a changeup from Miguel Castro inside the right-field foul pole for his third homer of the season. Prior to that at-bat, Gregorius was mired in a 3-for-32 slump dating to April 18.

McCutchen’s 16th career leadoff homer to dead centre off David Peterson put Philadelphia in front in the first. But Peterson settled in, striking out eight in five innings.

Conforto had three hits and two RBIs for New York, and McNeil finished with four hits and scored two runs. Jacob Barnes (1-0) pitched a scoreless inning for the win.

Philadelphia starter Zach Eflin scattered 10 hits over six innings. He permitted two runs, struck out seven and walked none.

TRAINER’S ROOM

Mets: OF Brandon Nimmo (bruised left index finger) and 3B J.D. Davis (sprained left hand) were out of the lineup. They are considered day to day after they got hurt on Saturday.

Phillies: OF Harper and C J.T. Realmuto returned to the lineup. Harper had missed three games with wrist issues after being hit in the face Wednesday night by a fastball from Cardinals reliever Genesis Cabrera. Harper appeared to double over in pain during his at-bat in the eighth inning but stayed in the game with what Girardi called “a stinger” after the loss. Realmuto had been sidelined since Friday with a hand and wrist issue on his glove hand, but played after testing it out during batting practice.

UP NEXT

Mets: Travel to St. Louis to begin a four-game series against the Cardinals. The Mets haven’t announced a starter for the opener. Adam Wainwright will start for the Cardinals.

Phillies: Host Milwaukee in a four-game set beginning Monday. Vince Velasquez will get the start for the Phils against Brewers right-hander Adrian Houser.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports