MIAMI (AP) -- The Washington Nationals' untimely slump left even Bryce Harper flailing Friday.
The NL batting leader struck out three times and stranded five runners, and the Washington Nationals lost their fourth straight game, 2-1 to the Miami Marlins.
"Bryce has had a fantastic year for us," manager Matt Williams said. "He had a couple of opportunities tonight, and it didn't happen for him. We'll try to give him those opportunities again."
Shorthanded Washington out-hit the Marlins 7-5 but went 0 for 6 with runners in scoring position, and the Nationals' lone run was unearned.
Washington, swept in a three-game series by the Mets earlier this week, fell 8 1-2 games behind first-place New York, which beat Atlanta 5-1, in the NL East.
"It's not over yet," said Gio Gonzalez, who allowed one run in 5 1-3 innings. "Things change -- a lucky rabbit's foot or something comes through. We're going to stay positive most of the time. We still have a lot of fight in us."
Mike Dunn (2-5) struck out Harper, the only batter he faced, with two on to end the seventh and keep the score 1-all.
J.T. Realmuto led off the bottom of the seventh with a double off Casey Janssen (1-5). After the Nationals misplayed a sacrifice bunt, Realmuto scored the tie-breaking run on a sacrifice fly by Miguel Rojas.
"A little unlucky, I feel like," Janssen said.
Jarred Cosart, sidelined much of the season because of vertigo, pitched five shutout innings for Miami before departing for a pinch-hitter. His last pitch might have been his best: He struck out Harper swinging on a nasty breaking ball with two runners on to end the fifth.
Dunn, a left-hander, came on to face the left-handed hitting Harper with two on and two outs in the seventh, and struck him out swinging on a 95 mph fastball. Harper is 2 for 17 lifetime against Dunn.
"He and Dunn have a history," Marlins manager Dan Jennings said. "In that situation it was the right time for Dunn. He made the quality pitches that he needed to make."
A.J. Ramos pitched around a two-out walk in the ninth for his 26th save in 32 chances.
Rolf Koehler, a first responder on 9/11 as a member of the NYPD, was introduced between innings along with his son, Marlins pitcher Tom Koehler.
Before the game, the Nationals recalled RHP Taylor Jordan (0-2, 5.29) from Triple-A Syracuse for his fourth stint in the majors this year.
Nationals: 1B Ryan Zimmerman (left oblique), sidelined since Monday, again sat out and may miss at least a few more games. "The experience with obliques is that it takes a while," Williams said. "We're trying to get him to the point where he can swing a bat." ... 2B Danny Espinosa, who hurt his right wrist fielding a ball Wednesday, also sat out. ... 1B-OF Clint Robinson missed the game to be with his wife, who was about to deliver a baby.
Marlins: RF Giancarlo Stanton (left hand) hit in an inside cage before the game and showed progress, Jennings said. ... SS Adeiny Hechavarria (left hamstring) is improving and might be available to play within a week, Jennings said.
Marlins RHP Jose Fernandez, returning from a right biceps strain that has sidelined him since Aug. 7, will try to become only the third pitcher since 1914 to win his first 16 career home decisions. Fernandez (4-0, 2.30) is 15-0 at Marlins Park with an ERA of 1.14. ... RHP Tanner Roark (4-4, 4.41) will start for the Nationals.