The offense during the first eight games of their winning streak was fueled by timely hits and a lot of home runs, but the Braves on Saturday manufactured their decisive run with walks, a heady play and hustle.

After three walks loaded the bases in the 12th inning, a ground out by Dan Uggla drove in the last run for the Braves in a 5-4 win against the Phillies at Citizens Bank Park, pushing Atlanta’s winning streak to nine games. Paul Janish’s take-out slide at second base and Uggla’s full-bore sprint were keys to avoiding an inning-ending double play.

“Janish went in there hard against (Chase) Utley,” Braves manager Fredi Gonzalez said. “And Danny busted hard down the line 90 feet to make that a bang-bang (play), and all of a sudden we win the game. You go in tip-toeing, and you give Chase a clean look at the first-base bag, and they turn (the double play) and we end up not scoring a run.”

Craig Kimbrel worked around a leadoff single in the bottom of the 12th to collect his 33rd save, and the Braves notched their majors-leading 35th comeback win and clinched the series. Perhaps most importantly in the big picture, they got an encouraging performance from Brandon Beachy in his second start since Tommy John elbow surgery.

“Beachy pitched great, and our bullpen shut them down like they always do,” s“Danny hustling and Janish taking him out on that play was huge.”

“Beachy pitched great,” said Freddie Freeman, who had a two-run single in a three-run fifth inning that erased Philadelphia’s 3-1 lead. “Our bullpen, of course, shut it down like they always do. And we were able to get a run across. Three huge walks and Danny hustling and Janish taking him out, that’s a big play right there. It goes unnoticed, but that’s a huge play, to be able to get the throw a little off-line and Dan could be that ball out. “

Uggla’s one-out grounder to shortstop Jimmy Rollins was a potential double play, but Janish’s slide swept out Utley’s feet. Uggla might have beaten the throw anyway — replays were inconclusive — but the umpire ruled Kevin Frandsen’s foot came off the base as he took the throw.

“At that point in time everybody’s ready to go home, and ready to go home with a ‘W’,” Uggla said. “And everybody knows the situation — you have to beat the ball out to get a run right there. So everybody’s going to be busting it, giving everything they’ve got, whatever they have left in the tank. And that’s what it takes to win sometimes. Everybody did that.”

Chris Johnson’s 11-game hitting streak and Atlanta-record eight-game streak of multihit games ended when he went 0-for-3 with two walks.

Justin Upton hit a third-inning homer and has hit .353 with three homers and eight RBIs in an eight-game hitting streak. He also walked twice and scored three runs as the Braves handed the Phillies their 12th loss in 13 games.

Center fielder B.J. Upton went 1-for-5 with a hard ground-ball single off Rollins’ glove in his first game back from the 15-day disabled list. He struck out twice with runners in scoring position and two outs, in the 10th and 12th innings, pushing his majors-worst average to .025 (1-for-40) in those situations.

But the Braves, with just one hit in the last seven innings, pulled out the win after making the Phillies pay for three walks by Jake Diekman in the 12th.

Diekman intentionally walked Evan Gattis with a runner at second and one out, then walked Janish — on four pitches, no less — to the amazement of everyone at Citizens Bank Park.It was the first plate appearance since July 14 for Janish, whose role is late-innings defensive replacement.

“Yeah, I’m pretty certain that’s not what they had in mind when they intentionally walked Gattis,” Janish said, smiling. “I don’t think they were trying to me. But it’s just one of those things. I try to do my best just to stay ready, so hopefully when the time comes I’m ready to go.”

Justin De Fratus replaced Diekman to face Uggla, and the Braves got the go-ahead run.

“Everything’s going good for us right now,” Janish said. “Right now we’re rolling, so we’re just going to try to not change anything and stay hot.”

Beachy, in his second game since a 13-month surgery rehab, gave up five hits and two walks in 6 1/3 innings and was charged with four runs (three earned), the last of which scored after he left the game.

His off-speed pitches and overall command were noticeably improved from Monday against Colorado, when Beachy gave up eight hits and a career-high seven runs in 3 2/3 innings.

It was a step in the right direction, for sure,” said Beachy, who threw 60 strikes in 98 pitches. “Rough first couple of innings, still kind of feeling for it. Then settled in, beared down and made some quality pitches in succession.”

The Phillies jumped to a 1-0 lead in the first inning when Rollins hit a leadoff single, advanced to third on a stolen base and throwing error by catcher Gattis, and scored on a ground out.

John Mayberry hit a two-run homer in the third for a 3-0 lead, and Carlos Ruiz followed Mayberry with a one-out double. But then Beachy retired the next six batters and 14 of 16, allowing just two walks. He didn’t give up another hit until Mayberry’s leadoff single in the seventh.

Mayberry’s homer came on a slider, one of just two that Beachy threw Saturday before shelving the pitch and sticking with curveballs and changeups to complement his fastball.

“I threw two (sliders) and the first one went about 800 feet,” he said. “I waited to try another one against the pitcher, then decided to leave that there for now. I’m a better pitcher with it. I’m going to keep working on it in bullpens, and eventually I’ll get the feel for that back and have that weapon.”

Beachy left after a sacrifice bunt advanced Mayberry in the seventh. With the Braves hoping to give standout rookie reliever Luis Avilan (4-0) an extra rest day — he ended up pitching the 11th and getting the win — Luis Ayala was brought in to protect the one-run lead. One out later, Rollins hit a two-out double to bring in the tying run.

“I thought (Beachy) was terrific,” Gonzalez said. “I think the more he goes out there and feels like it’s going to hold up – you do all that rehab from Tommy John and in the back of your mind you still wonder is it going to hold up – you’re going to see him get better and better and more confident as he goes along.”

Five innings later, Beachy had a good view when the Braves pulled out another win.

“I’ve been watching them do it all season,” he said. “Now to be a part of it, it’s completely different and a lot more fun for me. It’s just great watching them do what they do. You never have a doubt in your mind that they can come back, that they can go ahead. You’re never out of it with this lineup.”