Ozzie Albies went from scapegoat to hero. Then Kurt Suzuki sent everybody home.

In a 5-5 tie with two outs in the ninth, Suzuki shot one past the third base bag to give the Braves a 6-5 win over the Marlins at SunTrust Park on Thursday.

“I was just trying to get a ball up in the zone a little bit,” Suzuki said after the 10th walk-off in his career. “Just try to put a good swing on it. Not try to do too much, because that’s when you can get yourself into a little hole.”

The walk-off was the Braves’ seventh of the year and first since June 21 against San Francisco. The Braves have won 17 games in their final at-bat, second-most in the National League and trails the Red Sox and Angels by two for the major-league lead.

After the bullpen pitched four scoreless innings in a one-run victory over the Rangers Wednesday night, the Braves needed an encore performance; they came close to getting one, but Albies’ error put it in doubt.

Marlins rookie Brian Anderson hit a ball that snuck through Albies’ legs on what he called a “funky hop,” and Ichiro Suzuki’s two-out pinch-hit single broke a 4-4 tie in the eighth. But Albies wouldn’t go away quietly.

Matt Adams started the ninth with a pinch-hit double down the left field line. Albies, knowing he put the team in a hole, doubled pinch-runner Nick Markakis home to knot it at five.

“I was looking for something up to drive,” Albies said. “Get us that run because I was the one who made the error. I can’t let my team down. I have to do something, and I did.”

Freddie Freeman was intentionally walked, and Lane Adams grounded into a fielder’s choice at third. Suzuki hit a laser that won it.

But Albies’ bounce-back may be the story of the night. He said Ender Inciarte was the first to encourage him, reminding him everyone makes mistakes and not to let it hold him back.

“You see why the kid led the leagues in hitting,” Braves manager Brian Snitker said. “Even being the youngest guy in every league he’s ever played in, including this one.”

Albies is hitting .341 (28-for-82) over his last 21 games.

“When I made the mistake, I said I’ll be ready for the next one,” Albies said. “And I hoped I would get an (at-bat) too.”

Once down 3-0, the Braves’ fifth inning capped off a four-run rally. Inciarte led off with a triple and came home on an Albies sacrifice fly to right field. Matt Kemp hit his 18th home run to left center, giving the Braves a 4-3 lead. Kemp’s 20 go-ahead RBIs lead the team.

Braves starter Sean Newcomb put himself in an early hole. The Marlins sent seven to the plate in the first, scoring three. Dee Gordon led off the game with a triple. Christian Yelich singled him home before Marcell Ozuna hit the second triple of the frame. Anderson collected his first career RBI to make it 3-0. He was on base four times in the game.

Newcomb’s night ended at five innings. He allowed just the three first-inning runs, with four of the seven hits against him coming in the frame.

“Things happened pretty quick there in the first inning,” Snitker said. “It was a good job. Stuff was really good. It was crisp and fastball was good. Again, it’s a learning process every time he goes out there.”

“It was great to see Newk really just bear down after that first inning,” Suzuki said. “Settle in, find a groove and keep us in the game. That was the big spot in the game.”

The Braves broke through in the second. Rio Ruiz and Dansby Swanson singled and advanced on Gordon’s throwing error with one down. Jace Peterson, starting in right field for Markakis, plated them both with a single to left that trimmed the lead to one. He had two hits on the night after collecting one over his previous 18 at-bats.

Ruiz has a hit in each of his six games since being recalled from Triple-A Gwinnett. He’s batting .348 (8-for-23) in that span. Ruiz will be the primary third baseman for the Braves through September.

Marlins starter Dan Straily pitched five innings, allowing four runs. He entered the game with a 4.22 in four outings against the Braves, but a 3.60 ERA in 12 starts (65 innings) against National League East opponents.

Miami has 10 of its last 11 games, fading out of the NL wild card hunt.

Newcomb settled in after the first. He retired seven consecutive Fish before J.T. Realmuto and Brian Anderson led off the fourth with singles. Newcomb induced a A.J. Ellis double play, and intentionally walked Mike Aviles to face Straily, who struck out.

“I think there in the first I was picking a little too pick,” Newcomb said. “... I think I gave them just a few too many good pitches to hit. ... After that first, you want that to be it, so that was my goal to hold them just to that.”

The fifth presented more problems, but no damage, for the Braves’ rookie lefty. Giancarlo Stanton’s hard-hit single just missed Swanson’s glove. Newcomb walked Yelich, but Ozuna flew out and Realmuto grounded to third to end the inning.

Newcomb walked Anderson to start the sixth, and was relieved by Lucas Sims out of the bullpen. Sims forced Ellis to ground into his second double play of the night, and got Aviles to fly out to Peterson to complete his first relief appearance.

The Marlins tied it at four in the seventh. Sam Freeman walked Stanton and Yelich, and Ozuna singled off Jose Ramirez to score Stanton.

Inciarte led off the seventh with a single, but the Braves couldn’t do anything with it. Inciarte had a memorable night with a single, triple, walk and steal.

It was his 53rd multi-hit game of the season. Inciarte is on pace for 213 hits, which would be the seventh 200-plus hit season in Braves history. Ralph Garr holds the Atlanta record with 219 in 1971.

Despite the win, the Braves were eliminated from NL East contention Thursday. The magic number for wild card elimination is 12.