JUPITER, Fla. -- The wind was blowing and the ball was flying out of the park on a regular basis on Tuesday afternoon at Roger Dean Stadium.

Miami belted four home runs off Washington right-hander Dan Haren. But it was a two-run single by Placido Polanco that was the difference in an 8-5 win over the Nationals.

Giancarlo Stanton, who entered Tuesday with one homer this spring, delivered two home runs. Chris Valaika added a solo shot, and Chris Coghlan belted a game-tying, two-run homer.

The Marlins relied on the long ball to overcome two errors and a wild pitch that enabled the Nationals to build a 4-2 lead entering the bottom of the fifth inning.

Roger Bernadina connected on a home run for the Nationals, which tied the game at 5 in the seventh inning.

But in the bottom of the seventh, the Marlins scored three runs. Polanco delivered a two-run single, and Justin Ruggiano added an RBI double.

Haren worked six innings, giving up five runs on seven hits, and four homers.

Miami right-hander Henderson Alvarez pitched five innings, giving up four runs, with only one earned. He struck out seven.

A pair of solo home runs gave the Marlins an early lead.

In the first inning, Stanton connected on an opposite-field shot to right field. Valaika homered to left in the second inning.

The Nationals rallied back with two runs in the third inning, with one unearned. Kurt Suzuki led off with a single, and Alvarez was able to get two quick outs, but he was hurt by a walk to Jayson Werth. Bryce Harper delivered a run-scoring single, putting runners on the corners.

Washington pulled even when Ryan Zimmerman tapped a grounder to second, which was bobbled for an error by Valaika.

Up next: Washington will break into a split squad for the final time this season, with a group of Minor Leaguers making the trip to Jupiter to take on the Cardinals, and most of the big leaguers staying in Viera to face the visiting Braves. Ross Detwiler will start at Space Coast Stadium (1:05 p.m. ET) against Daniel Rodriguez and the Braves, while Taylor Jordan will start in Jupiter.