PORTLAND, Maine — A building where six people died in one of the deadliest fires in the state in decades was unsafely operated as an illegal rooming house, a prosecutor said in a closing statement in the trial of the building’s landlord.

Closing arguments wrapped up Friday in the trial of owner and landlord Gregory Nisbet, whose Portland building burned in November 2014. It could be days before the judge issues a verdict in Nisbet’s bench trial.

Nisbet, of Portland, was charged with six counts of manslaughter stemming from the deadly fire. If convicted, he would become the first landlord in the state found guilty of manslaughter for an accidental fire.

In Maine, manslaughter is punishable by up to 30 years in prison and a $50,000 fine.

Prosecutor Bud Ellis argued in closing that the building was “not anything close to resembling a family residence” and was unsafe for its tenants.

Investigators have said the house lacked functioning smoke detectors, and a lawsuit stemming from the fire alleged an emergency exit was impassable.

Nisbet’s defense lawyer argued that the building was being used as an apartment by tenants who lived like family. Also, the defense argued, the fire was much bigger than the state’s witnesses described and would have prevented the smoke detectors from working.

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

The fire, at a post-Halloween party, was blamed on cigarette butts that had been discarded in a plastic receptacle, investigators said. It was Maine’s worst fire in 40 years.

The accidental fire started on a wooden porch with flammable items like furniture and recycling containers before spreading into the apartment house.