The Braves’ bullpen blew another eighth-inning lead, but Eury Perez ultimately was the hero with a game-winning single in the bottom of the eighth and Atlanta pulled out a 9-8 thriller on Thursday night.

“Good for (Perez), good for us,” manager Fredi Gonzalez said. “He can do a lot of good things to help a major league team win a game, whether he comes off the bench and gets you a steal, plays great defense, makes a throw to get people out at the plate.”

Perez was one of three improbable MVPs along with shortstop fill-in Daniel Castro and 30-year-old rookie Adonis Garcia.

Those three combined to go 6-for-11 with four runs scored and three RBIs.

Perez has earned a regular outfield gig since getting called up June 18. Garcia is the seventh Braves rookie to hit four or more home runs in his first 14 big-league games since 1914. And Castro is 8-for-21 (.381) while starting for the injured Andrelton Simmons.

“Everyone’s been doing their job. It’s fun to watch,” A.J. Pierzynski said. “We keep calling up these guys that a lot of people don’t know and they keep doing their job and keep doing it well.”

Braves starter Matt Wisler (5-2) labored through 5 1/3 innings, with five runs allowed on three walks and nine hits — tied for a career high. He’d just tossed his worst big-league outing last Saturday in Philadelphia, when he allowed seven runs in 4 2/3 innings.

After giving up four runs in one in his first five starts (3.10 ERA, 29 innings), he’s surrendered four or more in three of his last four starts (7.04 ERA, 23 innings).

“I need to start slowing it down when I get guys on base,” Wisler said after the game Thursday. “I think I was rushing a little bit, letting the game speed up on me. I need to go back there and work to settle down when guys are on base and make sure I make my pitches.”

Atlanta’s bullpen blew an 8-5 lead in the eighth when Miami pieced together a walk and three hits before lefty reliever Andrew McKirahan recorded two outs. They eventually tied the game on Christian Yelich’s fielder’s choice.

The bullpen also blew a lead Tuesday against the Giants, allowing four runs in the top of the eighth to spoil Shelby Miller’s chance at his first win since May 17.

The Braves took a 6-5 lead in the bottom of the fifth when Joey Terdoslavich tripled home Cameron Maybin, who walked earlier in the inning. Adonis Garcia followed with a towering two-run shot to make it 8-5.

“(Garcia’s) solid,” Gonzalez said. “I think he’s got more home runs in the big leagues than he does in Triple-A. And they are big home runs, they seem like, all the time.”

The Marlins tied the game at 5 in the top of the fifth when former Braves fan favorite Martin Prado singled home Yelich, who started the inning with a double. Wisler escaped the fifth with only one run allowed after Adeiny Hechavarria grounded into a 6-4-3 double play.

Miami had trailed 5-2 in the third inning, but Derek Dietrich hit a home run to right and Prado hit a one-out sacrifice fly after back-to-back singles from Yelich and Justin Bour.

Jace Peterson broke a 2-2 tie in the second when he singled home Castro, who’d singled with one out.

Peterson finished the game 2-for-5 with the RBI and a leadoff double in the first inning. Since hitting .174 (16-for-92) in July, Peterson is 10-for-26 (.385) with two doubles, two home runs and seven RBIs.

The Braves scored two more runs in the second on Nick Markakis’ double. Markakis extended his hitting streak to 13 games (.333, 19-for-57).

“I think today was a big offensive day for us,” Wisler said. “I didn’t throw as well as I probably should have. The guys picked me up because, again, a lot of the credit goes to the offense today. They picked us up every time we gave up the lead.”

Marlins starter Jose Urena left after two innings with a left-knee contusion, as Castro hit him with a one-out comebacker in the second. He allowed five runs on six hits.

Miami grabbed an early 2-0 edge in the first inning. Dee Gordon, who was hitting .419 in 13 career games at Turner Field, smacked a leadoff double and Yelich singled him home after Dietrich walked. Two batters later Prado scored Dietrich on a sacrifice fly.

Atlanta matched the Marlins with two runs in the bottom of the first on hits from Peterson, Maybin and Pierzynski, and a sacrifice fly by Markakis.