The Maine Emergency Management Agency and other state agencies were working with local safety officials on cleanup and recovery.