WASHINGTON (AP) After getting rallied past, walked-off and routed, the Miami Marlins finally had something to smile about Sunday at Nationals Park.

J.T. Realmuto got a career-high five hits and drove in three runs, Martin Prado had four hits and the Marlins defeated Washington 10-2 on Sunday to snap a 14-game losing streak to the Nationals.

Miami piled up a season-high 22 hits, the first 19 of which were singles, and salvaged the finale of a four-game series.

''Obviously, we feel like at the worst we should have split this series,'' Realmuto said, ''but just coming away with a win today and not getting swept, hopefully it gives us momentum for the next time we play these guys.''

The Marlins lost the series opener 14-12 after leading 9-0 in the fourth inning. They dropped the next two games 3-2 and 18-4.

Ahead 4-2 on Sunday, the Marlins got run-scoring singles from Derek Dietrich and Realmuto in the seventh. Justin Bour added a two-run double in a four-run ninth.

''I think the biggest difference today was it seemed like we kind of got the big hit when we needed it,'' manager Don Mattingly said. ''We drove in some runs with two outs and got some hits that kind of extended innings and just kept tacking on runs.''

Adam Conley (3-1), who gave up five runs in two-thirds of an inning in the series opener, pitched two scoreless innings of relief for the win.

Mark Reynolds, given a start at third base by the Nationals after his 10-RBI game Saturday night, went 2 for 4 with a walk. He also pitched one-third of an inning, retiring the only batter he faced in the ninth.

''Home plate looked a mile away. Just trying not to hit anybody. A little nerve-wracking,'' Reynolds said. ''But I always wanted to do it. It was a cool experience.''

Daniel Murphy drove in Washington's runs with a single and a sacrifice fly.

Realmuto's two-run single capped a three-run second. Dietrich was hit by a pitch twice and reached base five times.

Neither starting pitcher recorded a 1-2-3 inning or made it past the fourth.

Washington's Tanner Roark (3-11) hasn't won since June 6. He allowed four runs, 10 hits, three walks and hit two batters while throwing 102 pitches over four innings.

''When you've got to use your bullpen in the fifth inning, these guys are strapped,'' Nationals manager Dave Martinez said after his starters exited early in three of four games. ''Our starters have got to go deeper in the game. They do. If we're going to win consistently, they've got to pitch.''

Trevor Richards was slightly better for Miami. Lifted with two outs and the bases loaded in the fourth, he gave up two runs on four hits and seven walks.

QUOTABLE

''It feels like every time a team has just really kicked the dog out of us, the next day we've responded really well.'' - Realmuto on the Marlins bouncing back from Saturday's 18-4 drubbing.

FLIPPING IS OUT

Martinez said he spoke with catcher Pedro Severino, who flipped his bat after hitting his second homer of the season Saturday night. ''Yeah, I'm not a big fan of that. I get these guys who hit a lot of home runs, whatever,'' Martinez said. ''But when you have two, the bat flip doesn't play.''

TRAINER'S ROOM

Marlins: Dietrich crashed into the wall in left-center after making an inning-ending catch in the third. He remained down on his back momentarily but then jogged off the field.

Nationals: LHP Sean Doolittle has a strained toe and Martinez wasn't sure of his availability Sunday. ... With some minor leagues beginning their All-Star breaks Monday, the team is still trying to determine where RHP Stephen Strasburg (shoulder inflammation) will pitch his rehab game Tuesday. ... C Matt Wieters played five innings and went 0 for 2 with a walk in his second rehab game at Double-A Harrisburg.

UP NEXT

Marlins: RHP Jose Urena (2-9, 4.18 ERA) starts the opener of a three-game series against visiting Milwaukee on Monday night. He is 0-0 with a 6.35 ERA in six games - two starts - vs. the Brewers.

Nationals: Rookie RHP Jefry Rodriguez (0-0, 5.52) makes his third start Monday night when the Nationals open a three-game series at Pittsburgh.

---

More AP baseball: https://apnews.com/tag/MLBbaseball

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