MIAMI — The began the month of August in the middle of an 0-8 record, and this week they endured a stretch of 25 scoreless innings during a four-game period through Tuesday in which they scored just one run.

And yet, after bouncing back with a 7-4 win against the Phillies on Wednesday and having a day off Thursday, the Braves woke Friday in a tie with skidding Milwaukee for the second spot in the National League wild-card standings, after the Brewers lost their ninth consecutive game Thursday.

“Yeah, it’s obviously new life,” Braves left fielder Justin Upton said before Friday’s series opener against the Marlins. “It’s new life for us, being back in the hunt and having a spot now. We’ve just got to play better and try to win some ballgames and stay there. That’s the moral of the story.”

As poorly as the Braves hit and sometimes fielded in the past couple of weeks, they actually gained ground on the Brewers and Pirates in that period. That’s how badly things have gone for those two NL Central teams who began Friday four and 5 ½ games, respectively, behind division leader St. Louis.

“It’s been a crazy year when it comes to that kind of stuff,” said manager Fredi Gonzalez, whose Braves were just 5-6 in their past 11 games before Friday despite a 2.72 ERA in that period. “We’re all hanging in there. Everybody’s got life, that’s a good way to put it. There’s still playability left. Fun part of the year.”

Unless the Brewers and/or the Pirates can right their ships quickly, it appears the Cardinals will cruise to the division title and leave those two teams to compete with the Braves for the second wild-card spot behind the Giants. And the Braves still have four games against the Pirates in Atlanta in the last home series of the season, before finishing with three games at Philadelphia.

The Braves knew they could not afford to look ahead to a three-game series at Washington that begins Monday. Not when they had three games this weekend against a Miami team that had split 16 games this season with the Braves before Friday. The upstart Marlins were five games behind the Braves in the wild-card standings.

Their nine-game trip culminates at Texas with three games next weekend against the Rangers, who have baseball’s worst record and could lose 100 games.

“These games are important,” Upton said of the weekend series at Miami. “Especially with how good they’ve played us, we’ve got our work cut out for us.”

The Marlins are 14-16 since the beginning of August, including 3-8 with a 4.45 ERA in their past 11 games.

The Braves were 15-16 since the beginning of August, and had hit .221 and totaled just 27 runs and six homers in their past 11 games before Friday, including four shutout losses.

Meanwhile, the Brewers batted .216 and posted a 6.27 ERA in their nine-game slide before Friday, and the Pirates had lost four in a row and 13 of 20.