ATLANTA — Andrew Cashner could tell in the first inning that he didn’t have his best stuff.

“I wasn’t able to locate at all tonight,” he said. “With us still being in the (wild-card) hunt, I’ve definitely got to pitch better. Tonight was probably my worst outing of the season.”

Cashner failed to retire a batter in the five-run third inning and the Miami Marlins couldn’t rally after erasing a seven-run deficit in a 12-7 loss to the Atlanta Braves on Monday night.

Nick Markakis doubled to drive in the go-ahead run in the sixth and Tyler Flowers had four RBIs for the Braves.

The teams combined for 34 hits. Atlanta, which ranks 28th in runs scored, finished in double digits for just the third time this year and the first time at Turner Field.

Miami erased a seven-run deficit in the sixth on Christian Yelich’s RBI single and Giancarlo Stanton’s pinch-hit sacrifice fly made it 7-all.

After Markakis gave Atlanta the lead back, Anthony Recker’s pinch-hit RBI single put the Braves up 9-7 in the seventh. Flowers added a two-run single in the three-run eighth.

“We just weren’t able to stop them,” Marlins manager Don Mattingly said. “You’re only going to be able to come back so many times.”

Chaz Roe (2-0), the fourth of seven Atlanta pitchers, walked one and struck out one in the sixth to earn the win.

Brian Ellington (2-2), the sixth of nine Miami pitchers, took the loss after giving up four hits and two runs in 1 1/3 innings.

The Marlins sent 11 batters to the plate in the five-run fourth to make it 7-5. Braves starting pitcher Mike Foltynewicz hit Marcell Ozuna in the knee on the first pitch of the inning, but had to leave the game with the bases loaded when Ozuna’s liner hit him in the left calf.

Foltynewicz gave up 11 hits, five runs and struck out six in 3 2/3 innings.

The Braves took a 7-0 lead with a five-run third on a throwing error by shortstop Adeiny Hechavarria, Freeman’s RBI single, Flowers’ two-run single and Dansby Swanson’s sacrifice fly.

Cashner was chased with a walk that loaded the bases with no out. He gave up six hits, seven runs and two walks in two-plus innings — a poor performance after he posted a 3.38 ERA in his previous four starts.

“He just got hit,” Mattingly said. “They pretty much jumped him right from the start.”

Atlanta went up 1-0 in the first on Adonis Garcia’s groundout. Markakis hit his 11th homer to make it 2-0 in the second.

MOVING ON UP

Suzuki had three hits to pass Lou Brock for the 25th spot on the career list with 3,025 hits. Rod Carew ranks 24th with 3,053.

ON A TEAR

Freeman went 3 for 4 and has reached safely in a career-best 34 straight games. He’s hit safely in 18 straight and is batting .376 in his last 30 games. … Ender Inciarte tripled and doubled and is batting .357 with 43 runs scored in his last 55 games.

OVERTURNED

Jace Peterson was called out at third on Suzuki’s throw from the right field in the seventh, but the call was overturned after a 1-minute, 13-second video review ruled that Martin Prado’s tag was late. Peterson scored on Recker’s single.

TRAINER’S ROOM

Marlins: Ozuna was removed from the game for precautionary reasons in the fifth with a knee contusion. … Mattingly said Stanton (left groin strain) is getting closer to returning to the lineup, but had no immediate timetable. Stanton rejoined the team Sept. 6 after a three-week stay on the disabled list and is 1 for 3 as a pinch-hitter.

Braves: Swanson left the game before the start of the fifth with a right groin contusion. Swanson was standing with two infielders behind the mound when Ryan Weber was warming up and Flowers, the catcher, threw the ball over Weber and hit Swanson. … RHP Matt Wisler will start Tuesday after missing one turn in the rotation with left side soreness. In his last two starts, Wisler has allowed two runs in 14 innings.

UP NEXT:

Marlins: RHP Jake Esch (0-1) will make his third career start. He’s 0-1 with a 4.82 ERA and has never faced Atlanta.

Braves: Wisler (6-11) will make his 23rd start. He is 0-1 with a 5.84 ERA in two career starts and one relief appearance against Miami.