WASHINGTON -- Third baseman Chris Coghlan's ninth-inning error scored Nationals pinch runner Eury Perez, giving Washington a 5-4 win over the Miami Marlins in the second game of a doubleheader Sunday.
Miami won the first game 4-2, damaging the Nationals' minuscule playoff hopes. Washington (84-72) sits five games back of the two National League wild-card leaders, the Cincinnati Reds (89-67) and Pittsburgh Pirates (89-67), with six games to play.
The last-place Marlins (56-99) lost nine of 10 games at Nationals Park this season.
With the score tied in the bottom of the ninth in the nightcap, Jayson Werth led off with a double to left against Sam Dyson (0-2).
Perez replaced Werth, and with one out, he stole third on the front end of a double steal with Ian Desmond, who was intentionally walked. Coghlan muffed a grounder off the bat of Wilson Ramos, bringing home Perez.
Washington closer Rafael Soriano (3-3) pitched a scoreless ninth for the win.
In the first game of the split doubleheader, Giancarlo Stanton and Christian Yelich hit home runs and closer Steve Cishek pitched a perfect ninth for his 27th save in a row to tie a club record set by Todd Jones in 2005.
"I don't try to think about that stuff," said Cishek. "I just try to help this team win."
"He has been tremendous," manager Mike Redmond said of Cishek. "He is such a great competitor. He is perfect in that role. When he gets out there, we feel the game is over."
In the nightcap, the Marlins tied the game at 4 in the eighth inning when Stanton hit a double to score Yelich.
Denard Span lined a two-run hit past diving first baseman Ed Lucas to give the Nationals a 4-3 lead in the sixth.
Washington starter Stephen Strasburg went six innings and allowed three runs and six hits with six strikeouts.
Marlins starter Brian Flynn gave up two runs in four innings.
The Nationals start a three-game series Monday in St. Louis. Washington ends regular-season play next weekend with three games against the Diamondbacks in Arizona.
Earlier Sunday the Atlanta Braves clinched the National League East title a year after Washington won the crown.
NOTES: Stanton entered has 13 homers and 24 RBIs in 30 career game at Nationals Park ... Washington RHP Tanner Roark (7-0, 1.08 ERA) is slated to start Monday in St. Louis against RHP Adam Wainwright (17-9, 2.98). Roark leads the league with seven wins in a row, and he won his last six decisions at Triple-A Syracuse before he was promoted to Washington, giving him 13 consecutive wins ... The Marlins will begin a series Monday with Philadelphia, and the scheduled pitchers are Miami RHP Nathan Eovaldi (3-6, 3.79) and Phillies RHP Roy Halladay (4-4, 6.71). ... Washington 3B Ryan Zimmerman has 11 homers this month ... Strasburg recorded his 500th career strikeout when he got Yelich looking in the fifth.