Miami closer Steve Cishek surrendered Washington's three go-ahead runs in the 10th inning.
"It was a tough game," Marlins manager Mike Redmond said. "We battled. But overall, I think the way we've battled after the first couple of months, I'm very pleased with not only the effort, but the way these guys have continued to grind it out through a lot of adversity, at times.
"We've had some tough games, some tough losses. I think we preached that things would get better, and things would improve. I think we saw that."
Despite dropping their final game of the first half, the Marlins enter the All-Star break with a 22-17 record since May 31, tied for the second best in the National League during that span.
"Feels much better than last year going into the break," Giancarlo Stanton said. "I don't know the record difference, but we're playing well -- and we're never really getting blown out. That's the thing. It's not like we play six or seven, and we're just getting at-bats for ourselves. Every one counts now. They've been counting."
Big plays and new faces have made the difference for Miami during its recent surge, and clutch performances on Sunday nearly delivered yet another win.
Stanton threw out two baserunners in the fourth to keep Washington from building on an early 1-0 lead. Stanton is only the third Marlin to record two outfield assists in one inning, joining Mark Kotsay (2000) and Joe Orsulak (1996).
Stanton made the first throw from his knees to retire Jayson Werth at second. Werth was attempting to stretch a single into a double, after Stanton failed to catch the ball on a diving play.
The second assist came on a single by opposing pitcher Taylor Jordan with two outs. Stanton charged the ball and gunned down Ian Desmond at home for the third out.
"They were perfect throws and actually killed a few rallies that they had going, so it killed their momentum," starter Henderson Alvarez said through his translator.
Stanton's heroics set the stage for Derek Dietrich, who put Miami ahead, 2-1, with a two-run homer in the fourth.
The big plays by Stanton and Dietrich helped hand Alvarez an advantage, which he maintained until the seventh. Nursing a 2-1 lead, Alvarez issued a two-out walk to Bryce Harper. Anthony Rendon made him pay for the mistake, doubling home the tying run. A.J. Ramos replaced Alvarez and, after walking Ryan Zimmerman and Adam LaRoche, got Werth to fly out to center to keep the game tied at 2.
Alvarez allowed two runs on nine hits over a season-high 6 2/3 innings.
The Marlins' offense failed to capitalize on opportunities at a few points during the game.
After falling behind, 1-0, in the second, Miami botched some early chances.
Marcell Ozuna led off the second with a single and advanced to third on what looked like a double by Dietrich down the first-base line. However, the umpiring crew ruled the ball foul following a quick meeting, and the second baseman eventually struck out.
Adeiny Hechavarria singled to keep the rally going, but Greg Dobbs grounded into the Marlins' Major League-leading 37th double play with runners in scoring position.
Miami threatened again in the third. With two outs and runners on first and second, Stanton singled to left field with what looked like a game-tying RBI single. However, a miscommunication between third-base coach Joe Espada and baserunners Jeff Mathis and Placido Polanco spelled trouble.
Espada signaled for Mathis to stop at third, but Polanco did not expect to be held up at second -- resulting in both runners ending up at the hot corner when the cutoff throw came in from left field. Mathis was tagged out in the ensuing rundown.
"I think with two outs, [Polanco] just anticipated that [Espada] was going to wave Mathis there," said Redmond. "I think probably in any circumstance other than with Harper out there in left field, he would have. Harp has a great arm out there.
"He was just at third base when Harper was getting the ball, it would have been dicey there at home."
Another potential Miami rally also came up short in the seventh. After putting two runners on with one out and the game tied at 2, Juan Pierre flew out to left and Polanco struck out swinging to end the threat.
The failed rallies proved costly in the 10th, when Cishek gave up back-to-back two-out hits to Denard Span and Wilson Ramos to plate a pair of runs. The outing ended Cishek's streak of consecutive scoreless innings at 17 2/3. After Dan Jennings relieved Cishek, he gave up an RBI double to pinch-hitter Chad Tracy, with the run charged to the Marlins' closer.
"I really wanted to finish on a strong note for the first half, especially for the team. Sweeping the Nationals would have been great," Cishek said. "I realize it was a tie game, but I still put all of that on me. I really wanted to finish strong in the first half and to have gained some momentum going into the second half."
Despite entering the All-Star break with the worst record in the NL, the Marlins are confident, given their recent play. However, the club is certainly not complacent.
"By no means are we satisfied with where we are at," Redmond said. "We know we can get better. We know we can continue to improve. We'll go out there in the second half, and hopefully have a great second half and finish strong."