ATLANTA -- Braves manager Brian Snitker couldn't believe how quickly 23-year-old shortstop Dansby Swanson took control of a tough situation in ninth inning.
"That play Dansby made -- I'm not sure I've ever seen anything like that," Snitker said. "That ball's up the middle, and you go to third base. To have the guts to make that play is the biggest thing to me."
Mike Foltynewicz won his fourth straight decision at home, Swanson made a pair of outstanding defensive plays in the ninth inning and Atlanta beat the Milwaukee Brewers 5-4 on Friday night for its sixth win in seven games.
Eric Thames doubled leading off the ninth, and Domingo Santana hit a two-hopper to the second-base side of Swanson, who spun and threw out Thames at third.
Swanson, the front of his uniform covered in dirt from a busy night, pumped his fist after Johan Camargo reached up to catch the ball and tag out Thames, who slid headfirst.
"I was just thinking about a play kind of like that and just trying to be aggressive," said Swanson, the No. 1 overall draft pick two years ago. "It's just kind of crazy how you can process something before it happens and when it does happen, it just kind of becomes a reaction."
Travis Shaw flied out to the left-field warning track as Santana advanced, and Manny Pina lined out to Swanson, who made a diving backhand catch in the shortstop hole, for the final out.
Camargo had gone to a knee for a backhand stab of pinch-hitter Jesus Aguilar's hard-hit grounder in the eighth and threw to second base, starting an inning-ending double play.
"The ball Aguilar hit was a great double play, and the play that Domingo hit, that's a really nice play," Brewers manager Craig Counsell said. "Most shortstops are throwing that ball to first base."
Foltynewicz (5-5) gave up one run, four hits and three walks in five innings with nine strikeouts, improving to 4-0 with a 2.17 ERA in his last five starts at SunTrust Park.
Brandon Phillips homered and drove in two runs, and Arodys Vizcaino earned his first save since last June 26 against the New York Mets.
Foltynewicz enjoyed some rare success against left-handed batters, who were hitting .348 against him coming in. He held Eric Sogard, Marcus Thames, Travis Shaw and switch-hitter Nick Franklin to a combined 1 for 9 with two walks and four strikeouts.
Jimmy Nelson (5-4) allowed four runs, six hits and three walks in five innings. He had gone 4-1 with a 2.24 ERA in his previous nine starts.
"We did a good job to battle back," Nelson said. "Swanson made two good plays there to help them out of that last inning."
Atlanta, which has won three straight, took a 2-0 lead in the first when Phillips homered and Tyler Flowers got a RBI on what could have been an inning-ending double-play grounder. Sogard fielded the grounder to second and flipped to shortstop Orlando Arcia, who dropped the ball. Second-base umpire Ed Hickox ruled Matt Adams out at second, but the call was overturned on video review, causing Arcia to be given an error.
Milwaukee made two errors, raising its NL-leading total to 58.
Keon Bronxton's 12th homer cut the Brewers' deficit in the fourth, but the Braves opened a 4-1 lead in the fifth when Phillips hit a RBI double and scored on Flowers' single.
Santana had a RBI single off Sam Freeman in the seventh, and Swanson singled in the run against Brent Suter in the bottom half. Arcia hit a two-run double against Jose Ramirez in the eighth.
ON THE MEND, QUICKLY
After a CT scan and meeting with Braves team physician Dr. Gary Lourie, Freddie Freeman said his broken left wrist is 80-90 percent healed, up from 50 percent last week. The improvement led Freeman to move up the timetable of his return nearly two weeks on July 6 at NL East-leading Washington. Freeman wants to play three to four games on a rehab assignment and return as the starting third baseman.
Brewers: LF Lewis Brinson was in pain after getting hit on the left hand by a fastball from Ramirez in the eighth but stayed in the game.
Braves: LF Matt Kemp was held out of the lineup to rest his left hamstring. Kemp left Thursday's 12-11 win over San Francisco after singling in eight-run fifth inning. He missed two games last weekend with a similar injury and was on the 10-day DL in April with a strained right hamstring.
Brewers: RHP Matt Garza (3-3), scheduled to start Saturday, has won two of eight starts with a 4.56 ERA against Atlanta.
Braves: RHP R.A. Dickey (5-5), slated to pitch for Altanta, is 2-1 with a 3.64 ERA in four starts and two relief appearances against Milwaukee.