MIAMI -

Giancarlo Stanton homered twice and drove in four runs Sunday, and the Miami Marlins beat the Chicago Cubs 6-4 to avert a four-game series sweep.

Ricky Nolasco (2-2) gave up three runs in seven innings and retired the final 15 batters he faced. The Marlins improved to 6-19, still worst in the majors, and 3-10 at home.

They benefited from a rare offensive outburst, scoring more than three runs for only the fifth time this season and twice coming from behind.

Stanton led the way, showing further signs he has shaken a prolonged slump to start the season. Last year's NL slugging leader waited 65 at-bats to hit his first homer Saturday, then hit another in the first inning off Carlos Villanueva to put Miami ahead 2-1.