PORTLAND (AP) — Hours after a Halloween party, cigarette butts that had been discarded in a plastic receptacle ignited a fire that killed six people — Maine’s worst fire in 40 years, officials said Wednesday.

The accidental fire started on a wooden porch with flammable items like furniture and recycling container before spreading into the apartment house, said Maine Fire Marshal Joe Thomas. There were no working smoke detectors to warn residents when flames spread inside the house, officials said.

The fire killed Portland residents Nicole Finlay, David Bragdon Jr., Ashley Thomas and Christopher Conlee; Topsham resident Maelisha Jackson; and Rockland resident Steven Summers. Several others escaped.

“At the end of the day, I don’t have Steven,” said Summers’ wife, Ashley Summers. “There are a lot of families that are heartbroken.”

The cause of the fire was confirmed by computer modeling by Bureau of Alcohol, Tobacco, Firearms and Explosives, which was asked to assist in the investigation.

The fire started early on Nov. 1 after a Halloween party the night before. Several partygoers slept over in the apartment house, but investigators didn’t necessarily blame partygoers for the fire.

The fire marshal said smokers who lived in the duplex regularly smoked on the porch and discarded their cigarette butts in the tall, hollow plastic receptacle designed for cigarettes. If not regularly emptied, the receptacle could allow butts and paper to build up, creating the potential for a fire, he said.

The deadly blaze led to legal action and to the creation of a task force that met with landlords, tenants and the Portland Housing Authority to come up with recommendations for safety improvements.

The house had a history of code violations. Gregory Nisbet, its owner, didn’t immediately return a call seeking comment.