Ellis came in to pinch hit for Nick Wittgren in the 11th inning and smacked a two-run home run to center, scoring J.T. Realmuto. Miami took a 9-7 lead before Stanton hit his 26th home run of the season, providing A.J. Ramos a three-run lead to close out the game.
The Marlins fell behind in the second inning after Brandon Crawford hit a two-run home run that scored Brandon Belt, who reached on a leadoff double. Miami would then answer in the top of the third inning with back-to-back doubles by Christian Yelich and Marcell Ozuna. Stanton was hit by a pitch to lead off the inning and scored on the Yelich double, who reached third on a throwing error. Ozuna then drove in Yelich, tying the game at two.
In the fifth, Stanton hit his 25th home run of the season to give the Marlins a 3-2 lead. Giancarlo has been on fire recently, recording four home runs and 11 RBI while hitting .500 in his last six games.
Miami extended its lead in the seventh on a Justin Bour two-RBI single, scoring Stanton and Yelich. That was followed by a Realmuto single to center that scored Ozuna, giving Miami a three-run lead. Two batters later, Bour crossed the plate on a J.T. Riddle sacrifice fly putting Miami ahead 7-3.
San Francisco would claw its way back into the game in the seventh and eighth innings, scoring four runs to tie the game at seven. Kyle Barraclough was rocked in the eighth, allowing three earned runs on five hits in one-third inning of work.
The game would go into extras with Nick Wittgren pitching a perfect ninth and 10th inning. He recorded four strikeouts and threw 21 of his 32 pitches for strikes.
Ramos was able to close out the game in the 10th but it wasn’t a great showing. He allowed a leadoff triple to Kelby Tomlinson, who scored on a fielder’s choice by Conor Gillaspie, before recording his 17th save of the season.
The Marlins (41-46) finish the first half on a high note with the sweep of the Giants and a 6-2 record in its last eight games. They sit in third place in the NL East, 10.5 games behind the division-leading Washington Nationals, and nine games behind in the Wild Card.