Investigators say contractors working on pipes with a torch started the fire at the apartment complex in Coram.
The fire quickly spread inside the walls and attic.
The inside of the building was engulfed in flames when emergency crews arrived.
A large portion of the roof collapsed, making the entire structure unstable.
Officials say 40 people lived in the 16-unit apartment building.