Published: Aug 22, 2012 1:30 AM EDT
Updated: Aug 22, 2012 6:31 AM EDT

PHOENIX (AP) - Giancarlo Stanton hit a run-scoring single with two outs in the 10th inning and the Miami Marlins rallied from an early five-run deficit to beat the Arizona Diamondbacks 6-5 on Tuesday night.

Gorkys Hernandez beat out an infield single to shortstop off Sam Demel (0-1), the Diamondbacks' sixth pitcher, and went to second on a sacrifice bunt. Demel intentionally walked Jose Reyes and retired Carlos Lee on a flyball to center field before Stanton looped a clean single to left with the go-ahead run.

Chad Gaudin (2-1) struck out one and walked one in the bottom of the ninth for the win, his first since April 15 against Houston.