Firefighters battled through the night to get a fire that has devastated thousands of acres under control.