WASHINGTON (AP) -- The Miami Marlins finally got a win at Nationals Park, then guaranteed themselves the National League's worst road record in the same day.
Wilson Ramos' ninth-inning grounder bounced off third baseman Chris Coghlan's leg for a game-ending error that allowed pinch-runner Eury Perez to score from third, and the Washington Nationals beat the Marlins 5-4 Sunday night for a split of a day-night doubleheader.
After dropping their first eight games in Washington, the Marlins beat the Nationals 4-2 in the opener as Giancarlo Stanton and Christian Yelich homered and Steve Cishek tied a team record by converting his 27th consecutive save chance.
"He's been tremendous down there," Marlins manager Mike Redmond said of Cishek. "I think there's not a guy on this team that doesn't have all the confidence in the world in him and his abilities, and when he gets out there, we feel like that game's over. It's been fun to see him adjust."
Justin Ruggiano connected for a home run early in the second game. But the Marlins still finished the road portion of their schedule with a 26-55 record.
Miami could finish with the worst road record in the majors if the Chicago White Sox win at Cleveland on either Tuesday or Wednesday.
Meanwhile, the Marlins' afternoon win clinched playoff berths for the Atlanta Braves and St. Louis Cardinals, and left the Nationals five games behind NL wild-card co-leaders Cincinnati and Pittsburgh with six to play.
"I know we had the chance to be spoiler here with these guys trying hard to make a push at the playoffs," Yelich said. "We kind of took the approach, as we have with all our other games, play hard and get a W, but with the crowds and all that it was a cool atmosphere to play in front of."
In the second game, Sam Dyson allowed Jayson Werth's double to lead off the ninth inning, Bryce Harper popped to second, and after Dyson intentionally walked Ian Desmond, pinch runner Eury Perez and Desmond executed a double steal to put runners on second and third.
Ramos then grounded sharply to Coghlan, who couldn't corral it. Television replays appeared to show Coghlan would've had time to throw Perez out at the plate, and Ramos was not credited with an RBI.
The Marlins tagged Nationals starter Stephen Strasburg for three runs in six innings, then scored a game-tying run off reliever Tyler Clippard in the eighth when Yelich and Stanton connected for back-to-back doubles.
"We put some good at-bats together, battled and pushed one across," Yelich said. "We were in position to take the lead and that's all you can ask for."
But Rafael Soriano (3-3) pitched a scoreless ninth inning to win Washington's regular-season home finale.
Before Sunday's opener, Miami starter Tom Koehler (4-10) had been 0-4 in eight starts since Aug. 1. But Koehler allowed two runs and three hits in six innings, and Cishek pitched a perfect ninth for his 32nd save in 34 chances, completing a four-hitter and a scoreless afternoon for the Marlins' bullpen.
"You know it's crazy," Cishek said. "Out there I had a little more adrenaline pumping. It felt like a playoff atmosphere. The fans are really into it and those guys are digging in there and every at-bat was huge for them. It felt good to come out and win a game like that."
Cishek, who has earned 32 of his 50 career saves this season, began his streak June 8 in a 2-1 win at the New York Mets. He tied a mark set in 2005 by Todd Jones.
Dan Haren (9-14) lost to Miami for the third time this year, giving up three runs and eight hits in six innings.
Stanton's 24th homer, a two-run drive after Yelich doubled, put the Marlins ahead in the first.
"I know there's a base open, but it's the first inning," Haren said. "I guess in hindsight I could have just walked him. I wasn't trying to just challenge him, I was trying to get a good pitch down and away it just got a little too much plate."
Yelich added a solo shot in the third.
NOTES: The Marlins last swept a pair of games played on the same day when they beat San Francisco twice on May 25, 2008. ... The Nationals began Sunday with a ceremony honoring retiring manager Davey Johnson that included a pair of video tributes and the presentation of an engraved Tiffany crystal keepsake. ... Stanton has hit safely in 23 of 29 games at Nationals Park with 13 home runs.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.