A candle caused a fire that badly damaged an old mill building in Windham that had been occupied by squatters, investigators said.

The fire at the mill, a prominent landmark on Mallison Falls Road in South Windham, was reported just after midnight Thursday morning.

It was reported by Joseph Smith, who was in the process of moving his belongings out of the building, Stephen McCausland, spokesman for the Maine Department of Public Safety, said in an email Thursday.

Smith and his family had lived on the third floor of the building for a short time.

Power was disconnected Wednesday, and Smith was using candles to see inside, McCausland said.

Investigators said the blaze started in a stairway between the second and third floors.

The building, built in the 1700s, was originally a sawmill and then a woolen mill and later a steel mill.