AP photo by Matt Slocum / The Atlanta Braves' Marcell Ozuna, left, drives in a run off Philadelphia Phillies pitcher Zack Wheeler during the sixth inning of Friday night's game in Philadelphia. Ozuna was safe at first on a throwing error by shortstop Didi Gregorius.

PHILADELPHIA — Scott Kingery busted out of a big slump with a bigger swing.

Kingery hit a three-run homer off Mark Melancon with two outs in the 11th inning as the Philadelphia Phillies beat the Atlanta Braves 7-4 Friday night for their fourth straight win.

Kingery entered the game as a pinch-runner in the 10th inning and was hitting just .121 (8-for-66) before he lined the first walk-off homer of his MLB career on an 0-2 pitch.

Andrew McCutchen did a breakdancing move, spinning around on the dirt behind the plate before Kingery came across to score. Players greeted him with a few slaps and mostly air-fives.

"It was pretty strange," Kingery said. "I'm sure it would've been a lot of fun with fans and if we could get mobbed. Still pretty special."

McCutchen and Jean Segura hit two-run homers for the Phillies.

Atlanta's Ender Inciarte and Austin Riley hit consecutive pitches off reliever Adam Morgan into the seats in the seventh to tie it at 4.

Blake Parker (2-0) tossed a scoreless 11th, aided by J.T. Realmuto throwing out Inciarte trying to steal second for the second out with a runner on third. A video review upheld the close play.

"That's a tough one. We all thought he stole the bag," Braves manager Brian Snitker said. "Sometimes those don't go in your favor, either."

Realmuto was on second to start the bottom half against Melancon (2-1). He advanced on Segura's sacrifice. After Didi Gregorius was intentionally walked, Neil Walker struck out.

Kingery ended it, though, after missing an 0-1 pitch out of the strike zone.

"He came up huge," Phillies manager Joe Girardi said.

Phillies starter Zack Wheeler allowed two runs (one earned) and six hits in 5 2/3 innings and was in line to win his fourth straight decision before the bullpen surrendered the lead.

Braves starter Robbie Erlin gave up four runs and four hits in four innings.

"Fought back in the game, the bullpen gave us a chance, they held the game there," Snitker said. "We had opportunities. Hit some balls really hard that were caught. Made some great plays. A lot of good things happened. The outcome wasn't what we wanted, but a lot of really good things transpired over the course of the game."

The Phillies took a 2-0 lead in the third when McCutchen drove a two-run shot out to dead center for his third homer. Segura connected an inning later, hitting one just several feet to the right of the spot McCutchen's shot landed in the bushes.

Marcell Ozuna's RBI double in the fourth cut it to 2-1. The Braves got an unearned run in the fifth with two outs.

Before the game, McCutchen spoke passionately about social justice issues in the country. Players across the majors wore No. 42 on Jackie Robinson Day on Friday.

"I feel like Jackie Robinson Day feels a little different," McCutchen said. "We're not only celebrating Jackie Robinson Day as the person he was, breaking the color barrier in '47, really being the start of the whole civil rights movement, because that was really the first time where there was some integration in this nation. But the things that he did outside the game, he was very active within the civil rights movement. He always stood for what he believed in. I feel like it's come full circle, and I feel like that's what we're doing right now."