Police officers were inside the doomed warehouse known as the Ghost Ship less than two months before the fire that killed at least 36 people, video obtained by NBC News shows.
The footage from October raises new questions about whether authorities in Oakland, California, were aware of possible safety issues at the warehouse or knew that people were living there, even though it was not zoned for residential use.
Derick Almena, the embattled manager of the warehouse, said police came to the building while responding to a neighbor's party because they needed access to the roof. The Oakland Police Department declined to comment, citing the ongoing investigation.
But the police visit could be one of several chances that officials had to address conditions at the warehouse, which was home to an artists' collective.
The city of Oakland requires yearly fire inspections for residential and commercial properties, but the head of the firefighters' union said scarce resources may have meant the warehouse didn't get one.
"There are many unsafe buildings in the city," union chief Zach Unger told NBC News.
The two-story, 10,000-square-foot structure was a maze of makeshift studios and apartments, much of it crammed with wood furniture, and there appeared to be no sprinklers. Residents said the heating and electrical systems were improvised.
The warehouse owner, Chor Ng, rented it to Alemena, who lived there with his wife and three children and also rented space to other people.
In another possible missed opportunity, Child Protective Services visited the premises after the state took custody of Almena's kids last year, he said.
"CPS came through and looked at the space," he said. "That was ultimately it."
A former CPS investigator told NBC News that fire safety should be a key part of an assessment. It's not clear if the agency noted any issues during its site visit, but the children were returned to the couple.
The family was staying in a hotel the night of the fire because, Almena said, of a dance music party being thrown on the site.
In an interview Tuesday morning, Almena defended his management of the building and said when he signed the lease, he "got a building that was to city standards supposedly."
City records show at least 10 complaints had been lodged against the property since Ng bought it in 1997, ranging from trash and debris piling up to an allegation of an illegal structure. In some cases, the city corrected problems and then took out liens against Ng for the money spent on the work.
Housing officials say there was an open investigation into the building, but residents say they were never contacted. The Oakland Mayor's Office had no comment.
In a statement, the Ng family said: "We are also trying to figure out what's going on like everybody else. We're sorry to hear about the tragedy. Our condolences go out to family and friends."