Dani Martinez dived off the front of the bunch in the final 200m and had enough in reserve to hold on for victory.