NEW YORK (CBSNewYork/AP) — Walking Pete Alonso — the Mets rookie who leads the majors in home runs — is probably a good strategy. It’s not as good of a strategy when it scores the winning run.

The slugger drew a bases-loaded walk with two outs to cap chaotic ninth inning and lift the New York Mets to a 5-4 win over the Philadelphia Phillies on Friday night.

Pete Alonso #20 of the New York Mets celebrates with teammates after defeating the Philadelphia Phillies with a walk-off walk in the ninth inning during a game at Citi Field on September 06, 2019. (Photo by Michael Owens/Getty Images)

With the win, the Mets pulled into a tie with Philadelphia and Milwaukee, four games behind the Chicago for second NL wild card.

New York took a 4-2 lead in the bottom of the eighth on RBI singles by Alonso and Wilson Ramos. However, embattled closer Edwin Diaz (2-7), pitching for the first time since he gave up a walk-off three-run homer to Kurt Suzuki as Washington Nationals completed a seven-run ninth inning comeback Tuesday night, gave up a one-out, two-run homer to J.T. Realmuto in the top of the ninth.

However, the Mets bailed out Diaz in the bottom of the inning, when Mike Morin (1-2) retired the first two batters he faced before Juan Lagares singled to left-center. Lagares went to third when J.D. Davis, pinch-hitting for Diaz, got ahead 3-0 before singling to left on a full-count pitch.

Nick Vincent then plunked Jeff McNeil with an 0-2 pitch to load the bases. Alonso walked on a full count and then had his uniform torn off by teammates as he reached first base.

Phillies right fielder Bryce Harper left in the third inning after he was hit in the right hand by a pitch from Steven Matz.

After the game, manager Mickey Callaway left many scratching their heads by saying he would continue to trust Diaz in big spots down the stretch.

“We’re going to continue to have faith in him,” Callaway said.

After a 57-save season in 2018, Diaz has now blown seven saves and allowed 14 home runs this year. He has a putrid 6.62 ERA since the All-Star Break.

TODD TIME:

Todd Frazier reached a milestone when he singled to center for the 1,000th hit of his career. Frazier was congratulated by first base coach Glenn Sherlock as the ball was tossed into the Mets dugout for safekeeping.

Frazier is the 82nd active player to reach 1,000 hits. Red Sox shortstop Xander Bogaerts entered Friday with 998 hits.

PLENTY OF HBPS TO GO AROUND:

Bryce Harper became the 22nd player hit by a pitch in a Mets-Phillies game this season when he was plunked in the right hand by a fastball by Matz in the third inning. Harper remained in the game before being replaced by Sean Rodriguez in the bottom of the inning.

The Mets have been hit 15 times while the Phillies have been hit eight times.

While tensions boiled when Rhys Hoskins was brushed back twice by Jacob Rhame on Apr. 23 and again when Philadelphia right-hander Jake Arrieta hit three Mets on July 6, things remained calm Friday, when no warnings were issued and no other batters plunked before McNeil was hit with two outs in the ninth.

TRAINER’S ROOM:

INF Jed Lowrie (knee, calf) went 0-for-4 as the designated hitter for Single-A Brooklyn, which beat Hudson Valley 4-3 to advance to the New York-Penn League finals. It was the 12th rehab game since Aug. 20 for Lowrie, who signed a two-year deal in January but hasn’t played in the majors due to a variety of injuries.

UP NEXT:

RHP Marcus Stroman (7-12, 3.28 ERA) is aiming to earn his second victory for his hometown team. Stroman, who grew up about an hour east of Citi Field, is 1-1 with a 4.55 ERA in six starts since being acquired from the Toronto Blue Jays on July 28.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)