Jayson Werth and Anthony Rendon added an RBI each, while Denard Span walked twice and scored two runs for the Nationals, who avoided a sweep but nearly coughed up a three-run edge in the bottom of the ninth inning.
Tanner Roark (11-6) held the opposition to a run on three hits with seven strikeouts and a pair of walks over seven full innings. Drew Storen eventually claimed his first save of the season, but not before allowing a solo homer to Giancarlo Stanton and an RBI double from Adeiny Hechavarria.
Jordany Valdespin hit a solo homer for the Marlins, who tasted defeat for the first time since July 23 at Atlanta. Brad Hand (2-3) was charged with five hits and three runs over seven-plus frames in defeat.