PHILADELPHIA (AP) — Bryce Harper hit a two-run double off Dodgers closer Kenley Jansen with one out in the bottom of the ninth after pinch-hitter Matt Beaty hit a three-run homer off Philadelphia closer Hector Neris in the top half, rallying the Phillies to a 9-8 win over Los Angeles on Tuesday night.

Pinch-hitter Andrew Knapp hit a double with one out in the bottom of the ninth and Cesar Hernandez singled. Scott Kingery followed with a bloop single to center that scored Knapp to get the Phillies within a run. Harper then ripped a ball to the gap that bounced off A.J. Pollock’s glove and went to the wall.

Harper threw his helmet off rounding the bases, thrust his arms in the air and screamed while teammates stormed out of the dugout.

The Phillies rebounded from a 16-2 loss in the opener of a four-game series against the two-time defending NL champions.

Cody Bellinger hit his major league-leading 34th homer and Max Muncy, A.J. Pollock and Joc Pederson also went deep for the Dodgers.

Harper hit a three-run homer and drove in five RBIs, Brad Miller and Kingery also connected for the Phillies.

Ranger Suarez (1-0) got two outs for the win.

Neris was ejected after hitting pinch-hitter David Freese in the back with the next pitch after Beaty homered, and manager Gabe Kapler also was tossed.

Jansen (3-3) has four blown saves in 24 tries.

Kingery drove his 13th homer out to left to give the Phillies a 1-0 lead in the first. Muncy crushed his 25th homer on an 0-2 pitch in the second to tie it at 1.

After J.T. Realmuto reached on a throwing error on third baseman Justin Turner to start the Philadelphia’s second, Miller hit a two-run shot.

Harper then blasted his 17th homer to deep center with two outs to make it 5-1.

Bellinger lined a two-run shot in the fourth and Pollock connected one batter later to cut it to 6-4. Pederson launched his 21st homer in the fifth.

STARTING TIME

Dodgers: Walker Buehler gave up six runs — two earned — and four hits in six innings.

Phillies: Vince Velasquez gave up five runs — four earned — and five hits, striking out seven in 4 2/3 innings.

BENCHED

Phillies third baseman Maikel Franco wasn’t in the starting lineup because he didn’t run hard down the line on a grounder to third bases with two outs and the bases loaded during Monday night’s 16-2 loss. The throw was wide but Franco was still out.

Kapler wouldn’t call it a “benching” and added Franco said he didn’t run hard because of a groin injury, but his explanation made it clear it was disciplinary. Kapler hasn’t sat a player for lack of hustle until now and has heard plenty of criticism from media and fans for not doing it.

“Taking a player out of the lineup in a punitive way is not my natural way of handling these type of situations,” Kapler said. “In this particular situation, I thought it was critical to address in part because right after some of the other incidents that we’ve had, I had a conversation with the club (last month in Washington) and I shared with them that it’s not an acceptable level of effort and that we have to do a better job, so I thought this was the right time to make a change.”

Franco grounded out as a pinch-hitter in the sixth.

TRAINER’S ROOM

Phillies: LF Jay Bruce left in the third inning with a right oblique strain. … SS Jean Segura didn’t start because of a heel contusion. … RHP Edubray Ramos was placed on the 10-day injury list with a right shoulder impingement and LHP Austin Davis recalled from Triple-A Lehigh Valley. … RHP Juan Nicasio was activated from the 10-day injured list and RHP Yacksel Ríos was optioned to Triple-A.

UP NEXT

RHP Kenta Maeda (7-6, 3.82 ERA) starts for the Dodgers and RHP Nick Pivetta (4-4, 5.81 ERA) goes for the Phillies on Wednesday night.