Sam Navarro-USA TODAY Sports

Jorge Soler hit a two-out, two-strike walk-off home run in the ninth inning as the Miami Marlins rallied to defeat the Washington Nationals 5-4 on Tuesday night.

Trailing 4-2 with two outs and none on in the ninth, Garrett Cooper doubled and scored on Luis Arraez's single. On a 3-2 pitch, Soler belted a 99-mph fastball from reliever Hunter Harvey (2-1). The exit velocity was 111 mph, and the ball traveled 405 feet to left as the Marlins improved to 13-1 this year in one-run games.

Arraez, Bryan De La Cruz, and Jean Segura each had two hits for the Marlins. Arraez leads the majors with a .386 batting average.

The Nationals got a solo homer from Lane Thomas and a 3-for-3 performance by Jeimer Candelario.

Neither starting pitcher earned a decision.

Washington's Josiah Gray threw 104 pitches in seven innings, allowing two runs (one earned) and striking out five.

Miami's Jesus Luzardo, who threw 93 pitches in six innings, allowed one run and struck out seven.

The Marlins scored first. Miami loaded the bases with one out in the second on singles by Segura and Peyton Burdick and a walk to Nick Fortes.

Joey Wendle then hit a grounder to first baseman Dominic Smith, who got a forceout at second. Segura scored, and Burdick also came around when shortstop CJ Abrams' return throw to first was bobbled by Gray. Wendle earned one RBI, and the second run was unearned.

Washington got on the board in the sixth as Thomas led off the inning with a homer to right field. Thomas connected on a high, 95-mph fastball.

In the seventh, Fortes singled and raced to third when Garrett Hampson's chopper went over the head of Candelario for a double. The Nationals intentionally walked Arraez to load the bases with two outs, and Gray -- on his last pitch of the night -- got Soler on a groundout to end the threat.

Washington took a 4-2 lead with three runs in the eighth. Luis Garcia started the rally with an infield hit that was chopped about 20 feet in the air. Joey Meneses walked, and Garcia went to third on catcher Fortes' throwing error.

Candelario then tied the score with an RBI single, and Smith's two-out, two-run single on a 1-1 fastball from reliever Steven Okert gave Washington the lead.

More must-reads:

TODAY'S BEST
Panthers come from behind to take Game 4 vs. Bruins
Brad Keselowski breaks 110-race winless streak at Darlington
Pacers blow out Knicks on Mother’s Day, even series at 2-2
Hawks GM 'shocked' that his team won the NBA Draft Lottery
Prolific former Brewers, A's slugger announces retirement
Watch: Padres star passes father on all-time home runs list
Saints to sign veteran offensive lineman
Smother's Day: Pacers shut down Knicks in first half of Game 4
Flyers goaltender suspended from international play for three years
Pistons make wrong kind of history at NBA Draft Lottery
Watch: Pacers C Myles Turner makes absurd three-pointer in first quarter vs. Knicks
Hawks win 2024 NBA Draft Lottery
Giants place key outfielder on injured list
Broncos release former Super Bowl champion WR
Novak Djokovic thinks water bottle incident may have played role in surprising loss
Steelers agree to deal with veteran CB
Bruins captain out for Game 4 vs. Panthers
Veteran WR announces retirement from NFL
Mavericks come from behind to down Thunder, take 2-1 series lead
Stars continue road dominance with Game 3 win over Avalanche