The Mets' Pete Alonso is mobbed by teammates at home...

The Mets' Pete Alonso is mobbed by teammates at home plate after his walk-off home run to defeat the Yankees in the 10th inning of an MLB game at Citi Field on Thursday. Credit: Kathleen Malone-Van Dyke

Pete Alonso spent most of his Thursday failing, striking out twice, making an out on the first pitch twice and messing up in the field twice. But as the rain fell with the game was on the line in the 10th inning at Citi Field, it all washed away.

He demolished a two-run home run — the first walk-off long ball of his career — against the Yankees’ Albert Abreu to lift the Mets to a 9-7 win.

“Even though it was a really big spot, I felt calm and collected,” Alonso said. “It’s not that I haven’t been calm. It’s just that I felt more calm. I don’t know if that makes sense. I felt almost like numb at the plate. The brain is off. I felt the dirt underneath my cleats.”

That earned the Mets a 3-3 split of the six-game Subway Series, which was squeezed into one week. They have won consecutive games and are 17-21 heading into a four-game Labor Day Weekend set with the Phillies, one of the teams ahead of them in the NL East standings.

For Alonso, it was a much-needed highlight amid an underwhelming season and a bad day. He is hitting .209 with a .733 OPS. He stepped to the plate for that last at-bat 4-for-his-last-42 (with two homers).

On the brink of a win, he said, that didn’t matter.

“None of the stuff that happened is relevant — or it shouldn’t be relevant,” Alonso said. “Because what matters is that at-bat, because that at-bat is happening now. The at-bats that have happened before, they don’t matter in the moment. In the moment, it’s ‘I have a job to do and we have a game to win.’

Manager Luis Rojas said: “We’re always expecting a big stick from Pete. We’re always expecting he’s going to do something special.”

The Mets erased the Yankees’ four-run lead early and a separate three-run advantage late. Amed Rosario had a two-out, two-run single off Zack Britton in the eighth. In the ninth, facing Aroldis Chapman, J.D. Davis tied it with a homer mashed to center.

It was the fourth time in six games that the Mets forced one of the Yankees’ best relievers into a blown save. This one came days after Chapman hit Davis on the hip with a 98.5-mph fastball, causing him to miss two games.

“Any time a pitcher drills you or anything like that,” Davis said, “it’s good to get a little bit of revenge.”

For the second day in a row, a Mets reliever outpitched their starter. Robert Gsellman lasted just 1 2/3 innings and allowed four runs. They all game during his 42-pitch second, when he gave up four hits, walked three and exited with the bases loaded.

Chasen Shreve saved the Mets’ from falling farther behind, bailing out Gsellman and tossing 2 1/3 hitless innings. That gave the lineup time to come back against the Yankees’ J.A. Happ (five innings, four runs).

That has been Shreve’s specialty this season after signing a minor-league contract and winning a job on the Opening Day roster. Eight of his nine appearances have been longer than one inning. Over his past four games, he has allowed three hits and no runs in 9 1/3 innings.

“He’s been great. We’ve asked a lot from him, too, going two-plus like he did today,” Rojas said. “Today was different. He didn’t have the fastball/split touch that he usually has. His command was a little off, and he’s still pitching and competing very well.”

All that set the stage for the Mets’ late dramatics and a win as the they honored Tom Seaver, the greatest player in franchise history, a day after the world learned of his death. Alonso’s blast landed in the leftfield corner, near a memorial video board that contained Seaver’s name and years of life.

“He’s an absolute legend, and now he’s a baseball god,” Alonso said. “I feel like he's smiling down on us today.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME