Miami didn't let another late rally against Cardinals closer Trevor Rosenthal to go to waste.
After taking the lead in the top of the ninth, Steve Cishek got Yadier Molina to ground into a double play to secure a 6-5 Marlins victory.
Miami got on the board in the top of the first against Shelby Miller, with Casey McGehee driving in Christian Yelich with an RBI single to give the Marlins a 1-0 lead.
Andrew Heaney's first inning woes continued, as a Yadier Molina single to center field tied the game in the bottom of the frame.
A fourth inning Matt Holliday single gave the Cardinals a one run lead, and consecutive home runs by Allen Craig and Jhonny Peralta made it a 4-1 contest.
Heaney was lifted after just three and two third innings, during which he gave up five runs while walking three and striking out one.
A Christian Yelich three-run home run to center field against Seth Maness made it a one run game, and a McGehee RBI single with two outs against Trevor Rosenthal drove in Donovan Solano and tied the game.
Jeff Baker's RBI single to left field gave the Marlins a 6-5 lead that would not be lost.
Jacob Turner, Sam Dyson, and Mike Dunn added a combined three and a third innings of scoreless relief for the Marlins.
Hero of The Game: Giancarlo Stanton (0.477 WPA)
Goat of The Game: Andrew Heaney (-.322 WPA)
Play of The Game: Casey McGehee singled in the ninth, allowing Donovan Solano to score. (.397 WPA)