OAKLAND, Calif. (AP) — Palpable anger, deep sadness and tense moments swept a California courtroom Thursday as relatives of three dozen partygoers who died in a 2016 Oakland warehouse fire testified about their losses and slammed a plea deal for two men charged with involuntary manslaughter.

The hearing will last through Friday, when Judge James Cramer formally sentenced the pair who each pleaded no contest to 36 charges of involuntary manslaughter for the Dec. 2, 2016, fire at the warehouse known as the Ghost Ship.

In exchange for their pleas, Derick Almena, who rented the warehouse and is accused of illegally converting it into housing and entertainment space, agreed to a nine-year prison sentence, and Max Harris, who collected rent and scheduled concerts, agreed to a six-year term.

Several of the relatives who testified Thursday said they were upset with the plea deals.

"The city of Oakland should be held accountable" for failing to inspect and shut down the warehouse, Colleen Dolan said. She showed a photo of her smiling 33-year-old daughter, Chelsea Dolan, taken a few weeks before her death.

But when Dolan tried to display a coroner's photo of her daughter's charred body, Cramer gently interrupted her and said he had previously seen it.

"I had to kiss that burned body goodbye," said Dolan, agreeing to comply. "I am angry and bereft."

Moments later, Cramer politely interrupted Paul Matiasic, an attorney reading a statement by Sami Long Koppelman, whose 34-year-old son, Edmond William Lapine, was killed.

Mataiasic asked the judge rhetorically if he had lost a child.

"Yes, I have," Cramer said with a sad smile. "Just so you know."

Many relatives who spent the day crying and dabbing their eyes audibly gasped. The judge did not elaborate.

Cyrus Hoda, the brother of fire victim Sarah Hoda, 30, said the plea bargain smacked of a "sweetheart deal" and labeled Almena and Harris as "culture vultures" trying to become San Francisco Bay Area arts players by luring people to a dangerous place to live and party.

Alameda County District Attorney Nancy O'Malley said the two men had turned the warehouse into a "death trap" by cluttering it with highly flammable knick-knacks, blocking the building's few exits and failing to make adequate safety precautions before inviting the public inside.

Almena's wife and three children also lived in the warehouse but were staying in a nearby hotel the night of the fire. His wife, Micah Allison, and one of their daughters sat quietly in court alongside the grieving families.

Chris Allen, brother of 34-year-old victim Amanda Allen Keyshaw, and his parents traveled to the hearing from the Boston area. As his mother sobbed outside court, Allen said the family did not feel "justice has been fully served."

Dressed in jail garb, Almena, 48, looked unemotionally at the relatives as they testified, while Harris, 28, stared at the judge, who approved the plea deal last month.

Cramer told relatives of victims to try to keep their emotions in check during the testimony, which he said would be "a heart-wrenching hearing as befits the enormous loss in this case."

Almena and Harris could have faced life in prison if convicted at a trial. Now, they could serve only half their sentences after spending a year behind bars if they behave.

Investigators from the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives said they were unable to determine a cause of the blaze.

Victims' relatives allege in lawsuits that the Oakland Fire Department failed to inspect the warehouse annually as required and that inspectors would have discovered the illegal conversions.

Alex Katz, a spokesman for the city attorney, declined to comment.

The lawsuits also claim Pacific Gas & Electric Co. failed to properly monitor, inspect and repair electrical equipment that provided power to the warehouse.

PG&E said in a statement that it cooperated with the investigation and that a review of its records found no electrical problems at the building in the 10 years before the fire.

Warehouse owner Chor Ng, who has never been charged, did not return a phone message seeking comment.

___

This story has been corrected to show that Judge Cramer's last name was misspelled.