State and local emergency responders helped as fire departments worked for hours to contain the flames