The explosion caused a fire that left the five-unit building temporarily uninhabitable and caused $350,000 in damage.

Police said in June that a 13-month investigation indicated that Aviles, Hutson and Lom were manufacturing hashish oil in the apartment using highly flammable liquid butane to extract the oil.

The gas pooled on the floor during the manufacturing process, eventually leading to the explosion, police said.

Aviles and Hutson were charged with murder and manufacturing a controlled substance.

Police said the two acted with a conscious disregard for human life while making the hashish oil, which led to Lom’s death and endangered other residents of the building.

On Tuesday, Aviles pleaded no contest to the lesser charge of voluntary manslaughter and Hutson pleaded no contest to being an accessory to a crime. Prosecutor dismissed the charge of manufacturing a controlled substance against both defendants.

Aviles’ plea bargain calls for him to get a three-year state prison term when he is sentenced by Alameda County Superior Court Judge Stuart Hing on Oct. 24.

Under Hutson’s plea agreement, she will receive a sentence of five years’ probation, including one year in the county jail. She will be sentenced the same day as Aviles.

(Copyright 2012 by CBS San Francisco and Bay City News Service. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)