OAKLAND, Calif. — Lawyers said Friday that a tentative plea deal has been reached for two defendants in connection with a Northern California warehouse fire that killed three dozen partygoers at an unlicensed concert in 2016.

Attorneys for Derick Almena and Max Harris expect the two men to formally agree to plea deals on Tuesday.

Tyler Smith and Curtis Briggs, lawyers representing Harris, said the agreement was reached after more than two hours of negotiations, but it still needs to be finalized.

Earlier in the day, Almena’s attorney Tony Serra said his client agreed to plead guilty in exchange for an eight-year prison term. However, the details of that deal could have changed during the lengthy negotiations.

Serra also said Harris was arguing for a lesser sentence than Almena, who rented the warehouse and is accused of illegally converting it into a residence and entertainment venue.

Harris helped Almena manage the warehouse, collecting rent and scheduling concerts.

Prosecutors say Almena turned the cluttered building into a “death trap” with few exits, rickety stairs and dark and dangerous passageways.

Almena, his wife and three children lived in the warehouse but were staying at a hotel in Oakland on the night of the fire, which broke out during an electronic music performance.