Jim Rassol-USA TODAY Sports

Jake Burger hit a two-out, two-strike RBI single to center in the bottom of the ninth inning as the Miami Marlins earned a 4-3, walk-off win over the New York Mets on Tuesday night.

New York entered the ninth inning trailing 3-1 before tying the score against Marlins closer Tanner Scott (9-5). Brandon Nimmo leveled the game with a two-out, two-run double.

Miami (79-73) remains in a five-team race for the last two National League wild-card spots.

The Mets, who are out of the race, fell to 70-81.

Marlins second baseman Luis Arraez, who leads the majors with a .354 batting average, was scratched from the lineup due to a sprained left ankle he sustained during fielding practice. He bobbled a ball and then stepped on it, causing the injury.

Arraez, who was named Miami's MVP prior to the game, was replaced by rookie second baseman Xavier Edwards, who went 1-for-3.

The Marlins also lost reliever A.J. Puk in the seventh inning as he was hit in the back by a 97 mph liner off the bat of Nimmo.

Miami starter Braxton Garrett struck out seven batters and allowed one run, which was unearned, in six strong innings, but he was left with a no-decision when the Mets rallied. He gave up just five hits and no walks.

Miami won it in the ninth off reliever Trevor Gott (0-5). The rally started when Gott hit Nick Fortes with a pitch. A sacrifice bunt, an intentional walk and a groundout put runners at second and third ahead of Burger's single on an 0-2 cutter.

The Mets -- with the benefit of two Marlins errors -- opened the scoring in the third inning. Pete Alonso singled and reached second on left fielder Jon Berti's fielding error. Alonso subsequently scored when Garrett threw wildly to first after fielding Francisco Lindor's dribbler toward third base.

Miami tied the score in the bottom of the third on consecutive two-out doubles by Jorge Soler and Josh Bell.

The Marlins -- also due to an error -- took a 2-1 lead in the fifth. Berti doubled and scored when Mets starter Joey Lucchesi fielded Edwards' bunt and threw the ball past an uncovered third base.

Miami took a 3-1 lead in the sixth as Burger singled, advanced on a wild pitch and scored on Garrett Hampson's single to center.

Lucchesi yielded three runs, two earned, on six hits in 5 2/3 innings. He fanned five and walked two.

In the New York ninth, Jeff McNeil doubled and Mark Vientos singled to start the rally. Nimmo cashed in with his two-out double over the head of right fielder Jesus Sanchez.

More must-reads:

TODAY'S BEST
Pacers ride historic shooting performance to Game 7 blowout of Knicks
Watch: Aaron Judge blasts 13th home run in Yankees' seventh straight win
Knicks' Jalen Brunson suffers serious injury in Game 7 vs. Pacers
Phil Foden lifts Manchester City to fourth consecutive English Premier League title
Dodgers add recently acquired left-hander to active roster
Report: 2023 No. 7 pick expected to terminate KHL contract, join Flyers
Mavericks advance to Western Conference Finals aided by controversial call late
Connor McDavid, Oilers hammer Canucks to force Game 7
Tyson Fury-Oleksandr Usyk epic increases excitement for potential rematch
Seize the Grey wins in muddy Preakness
Even Mike Budenholzer admits the Suns need a point guard
Watch: Juan Soto's first multi-homer game as a Yankee
Xander Schauffele, Collin Morikawa lead at PGA Championship
Knicks could get major boost for Game 7 showdown with Pacers
Giants All-Star pitcher suffers setback in recovery from injury
Panthers star named winner of 2024 Selke Trophy
WNBA to investigate $100,000 sponsorship deals for Aces players
Tiger Woods blames one big factor for missing the cut at PGA Championship
'Ain't good enough': Draymond Green claims Celtics must 'win it all' or it's a 'failure'
Blue Jays GM wants struggling club to feel 'massive sense of urgency'

Want more Marlins news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.