OAKLAND, Calif. — A jury began deliberating Wednesday the fate of two men charged in a deadly fire at a San Francisco Bay Area warehouse two years ago.

Derick Almena and Max Harris were charged with involuntary manslaughter in the deaths of 36 people at a December 2016 party at the so-called Ghost Ship warehouse in Oakland.

Alameda County prosecutors say the men acted with criminal negligence when they illegally converted the industrial building into a residence for artists and held unpermitted events inside.

FILE - This combination of June 2017, file booking photos provided by the Alameda County Sheriff's Office shows Max Harris, left, and Derick Almena at Santa Rita Jail in Alameda County, Calif. AP

During closing arguments after a four-month trial, prosecutors told jurors that 35 of the victims died on the upper level of the warehouse because they received no warning and had little chance to escape down a narrow, ramshackle staircase.

Deputy District Attorney Autrey James said Almena failed to install smoke alarms, sprinklers and other safety devices and ignored repeated requests to obtain proper permits because he wanted to avoid inspections.

The prosecutor said Harris was "no innocent bystander" because he acted like a manager by collecting rent and coordinating events at the warehouse.

The defense countered that the men were being used as scapegoats and said city workers share the blame for not raising concerns about fire hazards. They also argued that the fire was set deliberately by outsiders. No official cause was ever determined by investigators, so arson could not be ruled out.

Almena's attorney rejected prosecutors' characterization that the warehouse was a "death trap" and said he wouldn’t have risked the lives of his three children by having them live inside the warehouse.

Almena and Harris have also been named in lawsuits from victims’ families saying that Oakland’s fire and building departments failed to inspect the warehouse annually as required. The lawsuits say inspectors would have discovered the illegal conversions.

The owners of the building were also named in lawsuits. They have not been charged and have not spoken about the fire.

Almena and Harris were set to be sentenced to nine and six years in prison, respectively, after pleading no contest to manslaughter last year. But a judge threw out their pleas after many of the victims’ families objected, saying their proposed sentences were too lenient.

They each face up to 39 years in prison.