PHILADELPHIA (AP) -- Adeiny Hechavarria had a pair of hits and scored the go-ahead run and the Miami Marlins took advantage of Philadelphia's sloppy play to end a five-game losing streak with a 6-1 victory over the Phillies on Wednesday.

Freddy Galvis of the Philadelphia Phillies attempts to field a ground ball at Citizens Bank Park in Philadelphia. (Hunter Martin, Getty Images)

The Marlins got plenty of help from Philadelphia, scoring five unearned runs.

They took the lead in the seventh. Hechavarria scored from third when Luis Garcia (1-1) balked while trying to hold the speedy Dee Gordon on first. It was the first run Garcia has given up in eight innings of relief this season.

And the Phillies' defense struggled in the eighth when the Marlins scored four unearned runs with help from two Philadelphia fielding miscues.

Cody Asche homered for the Phillies.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)