PHILADELPHIA (AP) — J.T. Realmuto hit a three-run homer, Hector Neris struck out Aaron Judge in a big spot and the Philadelphia Phillies beat the New York Yankees 5-4 Thursday night.

Phillies starter Zach Eflin allowed two unearned runs and four hits, striking out five in four innings in his first start this season. A beleaguered bullpen surrendered two runs the rest of the way on Gary Sanchez’s two-run homer off Nick Pivetta.

Deolis Guerra (1-0) tossed a scoreless fifth for the win and Pivetta went two innings. Jose Alvarez got two outs in the eighth around a double by Giancarlo Stanton, and manager Joe Girardi called on his closer to face the red-hot Judge, who came in to pinch-hit for Brett Gardner.

With Stanton on third, Neris fanned Judge swinging at a splitter. Judge hit seven homers in the previous eight games. Neris gave up a consecutive singles to pinch-hitter DJ LeMahieu and Mike Tauchman with two outs in the ninth before retiring Luke Voit on a deep fly to right-center for his second save.

The Phillies split the four-game, home-and-home series against the team that Girardi managed for 10 seasons, winning three AL East titles and one World Series.

Yankees starter Jordan Montgomery (1-1) yielded five runs and six hits in four innings.

The lefty quickly ran into trouble in the first. After Andrew McCutchen lined out, Rhys Hoskins walked and Bryce Harper ripped a single. Realmuto then launched his third homer in seven games into the empty left-field seats.

Loud fans gathered outside the ballpark beyond center field screamed “Sign J.T.” after the All-Star catcher circled the bases. Realmuto can be a free agent after the season.

A fielding error on second baseman Scott Kingery led to a pair of unearned runs in the second. Tauchman’s two-run single cut Philadelphia’s lead to 3-2.

Phil Gosselin drove a two-run double to left-center to extend the lead to 5-2 in the third.

Sanchez got New York within a run with an opposite-field drive to right in the seventh. He was 2 for 29 this season before going deep.

The Yankees have hit a a homer in 12 straight games to open the season, extending their franchise-record streak.

ROSTER MOVES

Yankees: Optioned INF/OF Miguel Andújar, INF Thairo Estrada and RHP Nick Nelson to the team’s alternate site. Signed RHP Nick Tropeano and put him on active roster. Transferred RHP Tommy Kahnle to 60-day injured list.

Phillies: Optioned RHP Enyel De Los Santos and OF Kyle Garlick to team’s alternate site.

TRAINER’S ROOM

Yankees: All-Star closer Aroldis Chapman, who tested positive for COVID-19 last month, is scheduled to throw another bullpen session on Saturday. He is expected to face live hitters next week. … Sanchez was in the lineup despite soreness and stiffness after taking a pitch off his elbow Wednesday night.

Phillies: RHP Reggie McClain was reinstated from the paternity list and placed on the 10-day injury list, retroactive to Aug. 3, because of right shoulder impingement.

UP NEXT

Yankees: RHP Masahiro Tanaka (0-0, 3.38 ERA) starts the opener of a four-game series at Tampa Bay on Friday night. LHP Blake Snell (0-0, 5.40) takes the mound for the Rays.

Phillies: RHP Vince Velasquez (0-0, 12.00) starts the opener of a four-game series against the Braves on Friday night. RHP Kyle Wright (0-1, 7.50) goes for Atlanta.