WASHINGTON (AP) Justin Bour and Martin Prado homered for the second straight game and the Miami Marlins dented the Washington Nationals' fading playoff hopes with a 6-4 win Thursday night.

The Nationals, opening their 11-game final homestand, fell eight games behind the idle New York Mets in the NL East.

Ian Desmond homered, singled and drove in four runs for Washington, which had won four straight.

More from FoxSports

Tanner Roark (4-6) took the loss, allowing six runs and eight hits over five innings.

Jarred Cosart (2-4) turned in his third straight productive effort since being recalled from the minors. He gave up two runs and three hits in six innings, walking three and striking out four.

A.J. Ramos got four outs for his 28th save.

Miami, winners of 12 of 16, broke a 2-all tie with a four-run fifth.

Miguel Rojas doubled and later scored on Dee Gordon's sacrifice fly. Christian Yelich and Prado hit two-out singles, then Bour fell behind 0-2, but worked the count to 2-2 before connecting for his 18th home run.

Roark has allowed 14 homers in 93 1-3 innings this season. He gave up 16 in 198 2-3 innings last season.

The Nationals closed to 6-4 in the eighth. Anthony Rendon led off with a single and one out later Bryce Harper singled. Pinch hitter Tyler Moore drew a two-out walk that loaded the bases and reliever Bryan Morris gave up a two-run single to Desmond.

Wilson Ramos walked to reload the bases, but Ramos fanned Michael Taylor.

Gordon led off the game with a single and one out later Prado homered.

Desmond tied it in the second with his 18th homer of the season, a liner into the visitor's bullpen.

TRAINER'S ROOM

Marlins: INF Adeiny Hechavarria (left hamstring tightness) hasn't played since Sept. 2, but took infield practice this week and is ''moving toward getting back on the field,'' according to manager Dan Jennings.

Nationals: INF Ryan Zimmerman (oblique) missed his ninth straight game, but could begin swinging the bat this weekend, manager Matt Williams said. . 3B Yunel Escobar was in the lineup after leaving in the eighth inning Wednesday because of a tight hamstring.

UP NEXT

Marlins: RHP Jose Fernandez (5-0, 2.06) makes his second start since returning from a biceps strain. Last Saturday against Washington, he allowed two hits and struck out seven over five shutout innings to earn the win.

Nationals: RHP Max Scherzer (12-11, 2.91) picked up his first win since July 30 when he threw eight shutout innings Sunday at Miami. He struck out six and didn't walk a batter.