Updated

Two California men will go to trial on involuntary manslaughter charges in the 2016 Oakland warehouse fire that killed dozens of partygoers, a judge ruled Thursday.

Alameda County Superior Court Judge Jeffrey Horner said prosecutors presented enough evidence to move forward with their criminal case against Derick Almena and Max Harris in the deaths of 36 partygoers, the San Francisco Chronicle reported. The blaze was the deadliest building fire in the U.S. in more than a decade.

Almena rented the Oakland warehouse known as the Ghost Ship that burned on Dec. 2, 2016, during an electronic music concert. Harris also lived in the building, and a witness testified that Harris was in charge of the unpermitted concert.

The warehouse had been illegally converted into living space for artists, was cluttered and had no fire sprinklers, according to investigators. Prosecutors said the men knowingly created a firetrap and deceived the building's owner, police and fire officials about people living there.

ghost ship fire

Derick Almena (left) and Max Harris (right) will go to trial in the deadly warehouse blaze. (Alameda County Sheriff's Office via AP, File)

The two pleaded not guilty and said they've been scapegoated.

The judge delivered his ruling after several days of testimony that provided a glimpse at prosecutors' case against Almena and Harris.

Aaron Marin, a musician who lived at the warehouse, recalled escaping the blaze by jumping out an upstairs window. He said the window was blocked by a projection screen, so it wasn't visible to most people.

He also testified that he didn't consider the warehouse a fire hazard while he was there.

A second witness, Jose Avalos, testified that he was among 15 to 25 people who lived at the warehouse at any given time and that he paid his rent of $565 a month to Harris.

“I felt like it was a place that would accept me,” he said. “I don’t really find that too much.”

Avalos disputed that Harris was second-in-command at the warehouse and said everyone pitched in to maintain the community.

Avalos also said police were called to the building several times to help with evictions before the fire and even knew the leaseholder by name.

The Associated Press contributed to this report.