A correction to an earlier version of this article has been appended to the end of the article.

OAKLAND – Seven of them were found near each other on the second floor. Another was just 10 feet from an unpermitted fire door leading to a vacant lot next door. Eight others were found together wrapped in a rug, apparently having fallen all at once when the floor under them collapsed. They, like all the other victims of the Ghost Ship warehouse fire, died of smoke inhalation, their lungs and airways clogged with soot.

Harrowing details of how the 36 victims of the Dec. 2 fire struggled to live emerged late Monday when the city released a long-awaited 50-page report on the deadliest fire in modern California history. The document, compiled by the Oakland fire department, the federal Bureau of Alcohol, Tobacco and Firearms and the Alameda County Arson Task Force, provides new details on how the inferno burned and the harrowing recovery efforts.

Like the eight victims whose bodies were found in the rug, another 17 people were found in the rubble of the collapsed second floor where minutes before their death they had been dancing. Only two victims were on the first floor when the fire started and spread widely, fueled by everything from piles of wood to camping trailers left inside to furniture, according to the report.

At one point, some victims may have turned around while trying to escape down a makeshift wooden staircase, fearing it would collapse. Survivor Aaron Marin yelled “Kitchen! Kitchen!” trying to get people to follow him to a second floor window through which he eventually jumped and escaped. But having visited the warehouse before, he had knowledge of the building that others lacked.

No one followed him.

The report provided details about what investigators searched for in their efforts to pinpoint what started the inferno, but does not identify a cause, ruling it inconclusive.. The city posted the report without comment on its website Monday afternoon.

The report details extensive damage to the building’s electrical system, including two breaker boxes and a web of extension cords, that stymied investigators who have ruled the inferno’s cause cannot be exactly determined.

It could have been started by an electrical failure, the report states, but the investigators were also unable to rule out candles, incense or smoking materials and an open flame as possible causes, according to the document.

A retired fire investigator said given how badly the building burned, it isn’t surprising an exact cause is elusive.

“The day after the fire I realized it was going to be an absolute nightmare to figure out even the origin of the fire,” said John DeHaan, an independent fire investigator who spent nearly three decades as a criminalist focused on fire and explosion evidence. He added finding the cause “would be almost impossible because of the apparent nightmare of the improvised wiring.”

The fire appeared to burn heavier a few feet off the ground on the first floor, damaging the upper portions of a refrigerator more severely than its lower sections, investigators found.

A week after the fire investigators examined how power was supplied to the Ghost Ship. They concluded the main subpanel for the warehouse was next door, in a rear room inside Omar Vega’s auto body shop. There, they found two 50-amp circuit breakers “in the tripped or center position.”

“Handwriting on the inside of the panel door identified these as ‘Satya Yuga Main s’ (sic) and Satya Yuga Upstairs,’ ” according to the fire report. That’s a name that Derick Almena, the Ghost Ship’s master tenant, sometimes called the art collective.

Almena and the collective’s creative director, Max Harris, are charged with 36 counts of involuntary manslaughter in Alameda County Superior Court. Prosecutors charge the men knowingly created a fire trap and invited the public inside. Lawyers for the two men say their clients are being used as scapegoats and say the building owner Chor Ng should be facing criminal charges.

Ng, Almena, PG&E, are named in a wrongful death lawsuit that is in its early stages. The City of Oakland is expected to be named in the suit as soon as this week.

“Of course, we’d like to have them say what the cause of the fire is but we also have our experts and they are not done with their analysis. I don’t think it’s the end of the story,” said Mary Alexander, the lead attorney for the victim’s families.

The document details why, when the blaze was out, it took days to remove the bodies. Investigators shifted slowly through statues, mobile homes, mannequins, and mounds of furniture, all mixed together with what fell from above.

At one point, a “large wooden bird-like statue…(impeded their progress through the building),” the report states. At another point, “a passageway lined with pianos” had to be slowly combed through. Nearby, a photo in the report shows, was a portion of the staircase that some victims may have abandoned as an escape route.

The top steps had collapsed, the report states, and “the bottom steps to the mid-section of the staircase were intact.”

Correction June 22, 2017:

An earlier version of this story incorrectly reported where some of the victims were found. Seven victims were found upstairs but not next to a couch. A victim on the first floor was found next to an unpermitted fire exit, not the warehouse’s front door.