When the Marlins traded Dan Uggla to the Braves, a team in their own division, they had to know there would be nights like this.

Uggla’s three-run homer to straightaway center field in the seventh inning broke a scoreless tie and propelled the Braves to a 5-0 win in a series opener against Florida on Friday night at Turner Field, snapping the Marlins’ five-game winning streak.

Braves starter Brandon Beachy (4-2) allowed just two hits in a career-high 7 1/3 innings, and former Marlins second baseman Uggla extended his hitting streak to 20 games with his dramatic homer for a 3-0 lead.

“It really felt good,” Uggla said of his team-high 19th homer. “I try not to put too much emphasis on it, beyond the fact that it just put us in position to win, with the dominant bullpen we have.”

After Florida’s Emilio Bonifacio went 0-for-4 to snap his 26-game hitting streak Friday, Uggla’s is the longest active hitting streak in the majors.

Martin Prado added three hits, and Freddie Freeman had two hits and a sacrifice fly for the Braves, who scored five runs in the seventh and eighth innings. Freeman pushed his own career-best hitting streak to 13 games.

The Braves scored nine runs in 47 innings during a split of a four-game series with Pittsburgh that ended Thursday, a series that included games that lasted 19 innings and 10 innings.

Uggla sent a charge through a crowd of 36,063, which until that point had little to get excited over except Beachy’s strong performance.

He went deep against Marlins right-hander Clay Hensley (1-3), who had taken a two-hit shutout into the seventh inning in his third start since moving from the bullpen.

“Big home run,” said manager Fredi Gonzalez, whose Braves are 5-2 this season against the team that fired him as manager in June 2010. “Clay was pretty good to that point. He kept us off-balance. He made a mistake over the plate, and Danny got him.”

“Clay is one of my best friends, not just in baseball but everywhere,” Uggla said. “So we’ve been talking crap to each other all week long. He really made me look like an idiot the first two at-bats [double-play grounder and strikeout], so it was nice to get one and put our team on top.”

Beachy had one of the best starts of his brief career, limiting the Marlins to two hits and three walks in 7 1/3 innings with six strikeouts. The rookie right-hander did it against a hot-hitting Florida team that pounded out 26 homers and averaged more than 5 1/2 runs per game during a 14-5 run before Friday.

He said being locked in a pitchers’ duel for most of the night was “fun.”

“When the score’s 0-0, tie every pitch matters,” said Beachy, who didn’t allow a home run for the first time in eight starts. “I’d like to say that’s not something I think about, but of course it is. Five or six starts in a row of giving up at least a homer. It was really nice to have one where I didn’t make that big mistake that cost us.”

Beachy had three walks and six strikeouts and threw 66 strikes in 112 pitches.

“Outstanding performance,” Gonzalez said. “He went up and down the strike zone, down and away, down and in, breaking ball over the plate, he was dominating today.”

The Uggla homer opened the door for more Braves offense, including Jose Constanza’s first major-league hit — an RBI single in the eighth inning of the 27-year-old center field’s big-league debut. He hit a ground-ball single up the middle that scored Brooks Conrad, and then Constanza showed off his blazing speed while scoring easily on Freeman’s sacrifice fly to left.

Remarkably, it was the Braves’ first sacrifice fly since Chipper Jones hit one June 21 against Toronto. The Brave are last in the majors with 13 sac flies.

Uggla, who averaged nearly 31 homers and 93 RBIs over the previous five seasons for the Marlins, faced them in two previous series this season, both times while mired in the worst and longest slump of his career. He was 3-for-21 with one homer and one RBI in those six games.

Now he’s hit .342 with five doubles, seven homers and 15 RBIs during his career-best hitting streak.

Before Uggla’s homer, Mike Stanton’s two-out double in the seventh was the only extra-base hit in the game. It landed it front of a diving Constanza, who misread the ball and took a step back before racing in. Mike Cameron followed with a fly ball to left that stocky utility man Eric Hinske hauled in with a leaping catch at the warning track to end the inning.

Prado’s leadoff single in the bottom of the seventh ended a string of 16 consecutive batters retired by Hensley after consecutive one-out singles by Prado and Freeman in the first inning. Freeman followed him again with a single, and again the Braves had runners on the corners, this time with none out.

They didn’t waste this scoring opportunity. Two pitches later, Uggla connected with a Hensley slider and drove it to the seats beyond the center-field fence. He bashed forearms with a couple of Braves teammates after crossing the plate and with most others after getting back to the dugout.