MIAMI – This was not at all what Julio Teheran had in mind for his final start of the season, nor was it how Braves manager Brian Snitker hoped to start a season-ending series he had hoped might catapault the Braves into second place before they left Miami.

But for those hoping to see Giancarlo Stanton move closer to 61 home runs, there was that. The Marlins slugging machine crushed a couple of first-pitch breaking balls for home runs off Teheran and Rex Brothers in a 7-1 win over the Braves to open a four-game series at Marlins Park.

Stanton’s second homer was a two-run line drive in the eighth inning off Brothers and raised his season total to 59 home runs, two shy of matching the pre-steroid era single-season record of 61 homers by Roger Maris in 1961.

“He’s having a monster year, a monster year all the way around,” Braves manager Brian Snitker said of Stanton, whose 59 homers are the most in the majors since Barry Bonds (73) and Sammy Sosa (64) in 2001. His 10 multi-homer games are one from matching the single-season record shared by Sosa (11 in 1998) and Hank Greenberg (11 in 1938).

Stanton’s first homer Thursday came with two out and nobody on in the fifth inning on a first-pitch curveball from Teheran, after the Marlins had scored four runs in the fourth inning on four hits, two walks and a sacrifice fly.

“He’s really good,” Teheran said. “I don’t think I ever threw a first-pitch curveball to him. I never thought he was going to hit it like that. If I knew, believe me, I wouldn’t have thrown it. But he got a pretty good swing and there’s nothing I can do. He’s really good and he doesn’t miss a mistake.”

The Braves managed only three hits all night and trailed 5-0 before Lane Adams hit a two-out home run in the seventh inning. It was the fourth loss in five games on the season-ending eight-game trip for the Braves (71-87).

It will now be impossible to overtake the Marlins in the National League East standings. The best the Braves can do is try to hold off the Mets (69-90) and avoid falling into fourth place, and also try to win at least two of the remaining three games to avoid a third consecutive season of at least 90 losses.

The Mets, who were off Thursday, are just two games behind the Braves with three left to play for both teams. The Mets close the season with a series at Philadelphia that starts Friday, while the Braves have three more against the Marlins, who have a now-unsurpassable four-game lead over Atlanta.

Teheran (11-13) allowed eight hits, five runs and three walks with three strikeouts in six innings and tied the career-high for losses that he set in 2014. But he was 14-13 with a 2.89 ERA that season, compared to this year’s 4.49 ERA that is the worst in his five full major league seasons and nearly a full run higher than his career ERA.

He did, however, have an 2.25 ERA over his past eight starts before stumbling Thursday.

“I’m happy the way I finished at the end of the season,” he said. “It was a really tough year. That’s all I can do, just work and try to do my best. I was able to get some good starts; my last one was kind of rough, but it’s nothing I can do, it’s part of the game.”

Snitker spoke briefly with Teheran when he came out of the game.

“I said the thing I’m proud of him for is how he stayed the course,” Snitker said. “He kept prepared every start. You couldn’t tell between starts if he was going through troubles or whatever. He worked, he threw all the side (sessions), he competed. He had good runs, bad runs, but he was a true pro through the whole thing. The year probably wasn’t what he wanted, but there were a lot of good things that happened for him. Some not so good. But through it all, he just kept preparing, he kept doing what he was supposed to do.”

Snitker said before Thursday’s game that he’d had his eye on this Miami series for a couple of weeks, hoping that the Braves might be in position to overtake the Marlins for second place on the final weekend of the season. After all, the Braves had won 10 of 15 games against them season and had a 34-16 record in Miami since Marlins Park opened in 2012.

Plus, they had Teheran on the mound, their four-time opening-day starter coming in with an 8-2 record and 2.84 ERA in 14 road starts before Thursday — the sixth-best road ERA in among NL qualifiers.

But after giving up two or fewer runs in five of his past six starts, Teheran struggled with pitch command Thursday and couldn’t get into a good rhythm until the Braves trailed by five runs.

Meanwhile, his counterpart, rookie left-hander Dillon Peters, entered with a 6.31 ERA and proceeded to pitch 5 2/3 scoreless innings of two-hit ball against the Braves for his first win in his sixth start. Peters (1-2) issued four walks in the first four innings, but the Braves advanced only one runner to second base through five innings and didn’t get a runner to third base until the sixth.

Teheran gave up a leadoff single in the first inning and a walk and single to start the second, and got out of both of those innings unscathed. But trouble came knocking again in the third inning, and this time he couldn’t keep it at bay.

Dee Gordon led off the third with a standup triple to the right-center gap and scored on a wild pitch that Teheran bounced past catcher Tyler Flowers with Stanton batting. Stanton and Christian Yelich drew consecutive walks and Marcell Ozuna hit an infield single to load the bases for Justin Bour, whose two-run single gave the Marlins a 3-0 lead, still with none out in the inning.

J.T. Realmuto added a dribbler of a single not far up the third-base line to become the sixth consecutive Marlin to reach base before Teheran finally recorded an out on a Derek Dietrich sacrifice fly that brought in the fourth run of the inning.

Teheran retired seven of the last eight batters he faced following Stanton’s fourth-inning homer.

“He had the one inning, the six or seven (runners reached base),” Snitker said. “He missed his mark in the one inning but then regrouped…. Like I told him, the stuff wasn’t all that bad. It got away from him in the one inning. He just was off the plate and couldn’t command anything, really. Then he had the two swinging bunts that didn’t help. But then he kind of regrouped.”

Julio Teheran gave up five runs including one of two homers Giancarlo Stanton hit in the Marlins 7-1 rout of the Braves Thursday in Miami. (Video by David O'Brien)