MIAMI – Only once in the Braves’ 140-year franchise history has a team lost its first 10 games in a season, and for much of Friday night it looked as if those 1988 Braves would have some company in that ignominious club.

But after falling behind 3-0 and failing to advance a runner to second base through six innings, the Braves scored two runs in the seventh and four in the eighth for a much-needed 6-3 win against the Marlins that stopped Atlanta’s season-opening losing skid at nine games.

“It’s a great feeling. It really is,” said Braves manager Fredi Gonzalez, the subject of increased speculation this week regarding his job status. “It’s a total team effort.”

Adonis Garcia drove in three runs with a hit in each of the pivotal innings, and a maligned Braves bullpen came through with 4 2/3 scoreless innings, including a four-out save for Arodys Vizcaino, who struck out Marcell Ozuna with the bases loaded to end the eighth inning and got J.T. Realmuto on a ground out with two on to end the ninth.

“Important victory — not just because it’s the first one, but we came from behind and showed a lot of character,” Garcia said through a translator.

The Braves at least have maintained their sense of humor: They played “We Are The Champions” after the game, before their clubhouse was open to media.

Markakis back in leadoff spot, could stay a while

“We obviously needed a win,” said infielder Gordon Beckham, who drove in a run in each of the two big innings and made a key defensive play at second base. “I think everybody was getting a little tighter and a little tighter. So to get a win. … It’s a good day. We were down three and could have folded, but we battled back and obviously took it.”

The Braves didn’t have a hit until the fifth inning against left-hander Wei-Yin Chen, who allowed nine hits and five runs in five innings in his previous start against Detroit. But after Chen faced the minimum 18 batters through six innings, including a pair of double-play grounders, the Braves’ slumbering offense awakened.

“It loosens up a lot,” Braves first baseman Freddie Freeman said of the win and its effect on the collective team psyche. “Everybody wants to get the first one. To keep coming in every day and seeing a zero in the win column definitely gets a little frustrating. It’s nice to come out here and get a win.”

Despite start, Braves GM believes team better than 2015

Trailing 3-0, they chipped away with two runs in the seventh inning on three consecutive one-out hits off Chen, including singles by Daniel Castro and Freeman and Garcia’s RBI double. Beckham added a run-scoring groundout to cut the Marlins’ lead to 3-2.

The Braves took control with four-run eighth after a leadoff single from Tyler Flowers and a stolen base by pinch-runner Mallex Smith. A.J. Pierzynski was hit by a pitch before Nick Markakis’ game-tying one-out single off left-hander Chris Narveson, who was brought in to face him.

Narveson hit Freeman to load the bases before Garcia’s second big hit, a two-out, two-run single for a 5-3 lead. Beckham added an RBI single to cap the four-run inning.

“Today we talked about, it’s not going to be a three-run homer to get us going, it’s going to be a little thing that gets us going, like taking an extra base on a ball in the dirt or something like that,” Gonzalez said. “Today you know what got us going? A couple of hit batters. Flowers had a great at-bat, and we got a couple of hit batters and here we go, we put up a big number.”

Garcia made amends for fielding and throwing errors on consecutive plays in the third inning, which didn’t let in any runs but forced Williams Perez to throw about 20 extra pitches. Perez lasted 4 1/3 innings and allowed eight hits, three runs and two walks with one strikeout.

“The game didn’t start the way I wanted it to, and obviously my fielding didn’t start the way I wanted it to,” Garcia said. “But luckily baseball is a game of opportunities, and I got the opportunity to help the team.”

Freman said, “(Garcia) definitely came through for us twice today. It’s huge, and Gordon Beckham did an amazing job, too. Can’t forget him. It’s just nice to keep the line moving for a couple of innings. We haven’t been doing that, and it was mostly my fault. I’ve been stopping the line a lot.”

The Braves are 1-4 on a seven-game trip that began with a four-game sweep at Washington, where they’ve lost 14 in a row over two seasons. They’ll play two more at Marlins Park before an off day Monday and a likely Tuesday matchup with Dodgers ace Clayton Kershaw to start an eight-game homestand.

Bud Norris (0-2, 6.00 ERA) is scheduled to face Marlins right-hander Tom Koehler (0-1, 2.84) on Saturday.