WASHINGTON (AP) The Washington Nationals have endured early season struggles, yet manager Dave Martinez keeps reiterating that his team never gives up.

The Nationals proved their manager right Friday night, battling back from three- and four-run deficits to snap a season-worst five game losing streak with a 12-10 win over the Miami Marlins in a game that included 29 total hits and seven homers.

''I'm proud of these guys for not quitting,'' Martinez said. ''They could've folded early.''

Earlier Friday, National GM Mike Rizzo said it was too early in the season to pull the plug on the Nationals plans for the season and that the second-year manager's job was safe.

Juan Soto and Matt Adams hit back-to-back home runs in the eighth inning in what felt like a must-win situation - even in May

Soto's three-run blast off Marlins reliever Tayron Guerrero was his eighth homer of the season and put the Nationals ahead for the first time at 11-9. Adams provided insurance with his fourth homer of the season, and 100th of his career.

''I fell behind and threw fastball and he put a swing on it,'' Guerrero said after falling behind 3-1 before Soto's blast.

Soto, who said he saw Guerrero's 99 mph fastball closer to 94 mph, has 15 hits in his last 30 at-bats.

''Every time, every inning we try to fight,'' Soto said. ''We just try to keep going because we know we're good, so we're going to keep going until the last out.''

Adam Eaton and Anthony Rendon drew one-out walks off Nick Anderson (1-2) before Soto's homer.

Sean Doolittle gave up a homer to Jorge Alfaro in the ninth before earning his ninth save.

Starlin Castro's two-out, RBI single off Kyle Barraclough (1-1) in the eighth gave Miami a 9-8 lead. But it wasn't enough as the Marlins had their six-game winning streak snapped.

''If you had told me before the game we were going to get 10 runs and lose I would have said `hmm, probably not','' Marlins manager Don Mattingly said. ''But it was one of those nights.''

Brian Anderson got the offense going early with a two-run homer to left field, his fifth of the season.

Eaton cut the Nationals' deficit in half with his fifth homer in the bottom half of the inning.

Washington tied it in the third on Rendon's two-run homer, his 10th of the season.

Granderson's sixth homer of the season - a solo shot into the second deck in right field - put the Marlins back on top, 5-4, in the fourth.

Miami scored three runs in the fifth against Washington reliever Joe Ross, extending the lead to 8-4.

The Nationals entered Friday's game with a MLB bullpen-worst 7.02 ERA.

Washington had four errors in the game, while Miami had one.

TURNER TIMES TWO

Trea Turner had two errors in the third inning. The shortstop was charged with a throwing error to lead off the inning that allowed Brian Anderson to reach first base. Three batters later Turner bobbled a Harold Ramirez grounder. Turner entered Friday with one error in 11 games.

FAST START

Marlins centerfielder Harold Ramirez's RBI double in the fifth inning gave Miami a 6-4 lead. Since making his MLB debut on May 11 against the New York Mets, Ramirez has reached base safely in eight off nine games.

TRAINER'S ROOM

Marlins: Placed C Chad Wallach (concussion) on the 10-day injured list (retroactive to May 22) and selected catcher Bryan Holaday from Triple-A New Orleans. . RHP Riley Ferrell (right biceps tendinitis) is scheduled to pitch two innings for New Orleans on Saturday. . RHP Julian Fernandez (recovering from Tommy John surgery) will pitch an inning in extended spring training on Saturday.

Nationals: Anibal Sanchez (left hamstring strain) threw a simulated game with 41 pitches on Friday. Nationals manager Dave Martinez said that it went well, and that Sanchez also ran afterward. Martinez wasn't sure if Sanchez would make his next scheduled start; he might want to see him throw a rehab assignment.

UP NEXT

Marlins: Marlins: RHP Sandy Alcantara (2-4, 4.25), coming off his first career shutout in a win against the Mets, makes his third career start against Washington. He's 0-2 with a 10.13 ERA against the Nationals.

Nationals: LHP Patrick Corbin (4-2, 3.25 ERA) is 1-1 with a 4.62 ERA in six career starts against the Marlins.

---

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports

Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.