At least three major Bay Area cities have guidelines to address dangers posed by unsanctioned and unsafe properties when police officers or other city employees stumble upon them.

Their practices are unlike those in Oakland, which has no apparent policy in place for officers or firefighters to notify code enforcement inspectors when they come across structures like the illegally converted Ghost Ship warehouse that burned Dec. 2, trapping and killing 36 people.

Questions arose last week when the city released a trove of documents showing that police were repeatedly called to the ramshackle building for complaints of raves, fights and drugs in the years before the deadly music party. Information on the hazards inside — no sprinklers, no alarms, tangles of electrical wires, a single and perilous exit pathway — was never sent up the chain of command to the people who could have shut down the operation.

Mayor Libby Schaaf’s spokeswoman, Erica Terry Derryck, said last week that officers “are not trained to be building inspectors.”

“Their job is to serve and protect, and in the instances where officers visited the warehouse ... they were on-site to deal with specifically ... potentially dangerous activities,” Derryck said.

The Chronicle checked with three Bay Area cities — San Francisco, San Jose and Richmond — to see what their practices were and found that they all have systems in place to ensure that police officers notify the proper authorities when they encounter hovels with dangerous conditions. And their procedures were in place long before the fire.

“I’d much rather have somebody question why we’re taking this kind of action if it saves their life,” said Tim Higares, director of Richmond’s Department of Infrastructure Maintenance and Operations. “I’ve seen a garage divided into six partitions with no egress. We’re just not going to tolerate that.”

Policing expert Tony Ribera, director of the International Institute of Criminal Justice Leadership at the University of San Francisco, said that in common practice there should be no instance in which a police officer sees dangerous living conditions and doesn’t report them to building code officials.

“What we frequently hear as a rationale for not doing anything in an instance like that is that, ‘We were busy,’” said Ribera, a former San Francisco police chief. “But to me that’s an indication of poor time management. I don’t accept that.”

In Richmond, each police beat has an assigned code enforcer who gets to know the officers in the district, Higares said. New officers get a two-hour orientation on how to spot code violations and report them correctly, and veteran officers also get periodic trainings.

After the Ghost Ship burned, Richmond code enforcers promptly red-tagged a makeshift punk venue called Burnt Ramen, saying it lacked proper permits and was home to numerous safety violations that required immediate attention. Shutting down the venue was atypical but necessary, Higares said.

“There’s this narrative going around that enforcement agencies are out to put people out,” he said. “We don’t operate that way, unless we see a dire health and safety issue where someone is in danger.”

The two largest cities in the Bay Area have interdepartmental procedures that align closely with those of Richmond.

In San Francisco, each of the city’s 10 district police stations has a uniformed police officer designated as a “permit officer” who handles complaints about hazards in buildings, whether they come from the public, another officer, a firefighter or anyone else.

If an officer responds to a call and sees a potentially dangerous or illegal situation, the practice is that he or she “absolutely refers it to a permit officer,” said San Francisco police spokesman Officer Robert Rueca.

For serious complaints, the permit officer leads a “task force inspection” of the property, and “we invite every department to come along, whether it’s the Fire Department, Health Department, plumbing specialists, whatever,” said Rueca. “At that point, it’s not necessarily a police matter, but we’re involved to make sure the inspections are done safely, especially if parties are not cooperative.”

If a tenant or property owner refuses to give permission to inspect the property, the city attorney gets a court order to force the issue.

“There are a lot of categories of what we inspect, and we always look at it from a multiple city agency point of view,” Rueca said. “Sometimes it’s a fire hazard, a building code violation or hoarding. We run into electrical issues that can cause fire, or abandoned houses not being properly cared for that can pose a danger with vermin or wild animals.”

Rueca said permit officers respond to dozens of calls a year.

San Jose has a similar practice, said Cheryl Wessling, spokeswoman for the city Department of Planning, Building and Code Enforcement.

“Our code enforcement staff and police and fire work closely together,” she said. “Like most big cities, code enforcement in San Jose is complaint-driven, because we don’t have enough staff to proactively go out and find violations. However, we do have some programs where we go out and proactively inspect.

“This includes units in multifamily buildings — depending on the history of violations in the building — that may get inspected on a one-to-five-year basis, and we proactively inspect retail sales of tobacco, marijuana, and off-sale alcohol.”

She said the city fire marshal’s staff visits some types of properties on an annual basis. San Jose has 49 code enforcement inspectors with 12 vacancies, and many are assigned to special programs so they are not able to proactively inspect throughout the city.

“Right after the Ghost Ship fire happened, we did go out and look at one warehouse that could potentially have a problem of artists living there,” Wessling said. “But fortunately we didn’t observe any problems.”

San Jose has 219 warehouses, but Wessling said they have a very low vacancy rate.

In Oakland, Councilman Noel Gallo said the Ghost Ship exemplifies “the lack of cooperation from department to department” and fuels a perception that city employees are disengaged from the community.

“No one spoke up. No one did anything about it, and that was a total disregard for public safety,” said Mary Alexander, a lawyer representing more than half a dozen families whose children died in the fire.

Schaaf said the city will eventually consider changing the way city employees communicate dangerous conditions with one another. The priority now is to address imminent risks in 18 buildings in the city that the mayor said inspectors identified as having unsanctioned and unsafe live-work conditions.

“Before we adopt a new policy or training for our already-stretched city employees, we’re thinking about unintended consequences,” she said. “We want to make sure people aren’t chilled to call 911, especially in sensitive crimes like domestic violence.”

Ribera, the policing expert, finds unacceptable any notion that officials should turn a blind eye to substandard living conditions because enforcing code strictures could lead to evictions or homelessness.

“We are a country of laws, and if they are unreasonable or discriminate against poor people, change the laws,” he said. “I do understand the sensitivity of the housing situation. But it’s not a matter of not being compassionate.

“It’s all well and good to say these are poor people who need our compassion, but they also deserve our protection, too,” he said. “That way you don’t have dangerous living conditions that wind up killing people in a fire.”

Sgt. Barry Donelan, president of the Oakland Police Officers’ Association, said officers in the city are stretched thin, dealing with more crime per officer than any other major city in the country. Still, he added, if Oakland wants its officers to take on a new reporting duty, they would.

“If you want to add more onto our plate, OK,” he said. “These officers work harder pound for pound than any officer in America. But let’s understand the environment. You have a staggeringly understaffed department. We’re still hundreds of officers below where we should be just to deal with crime.”

Kimberly Veklerov and Kevin Fagan are San Francisco Chronicle staff writers. Email: kveklerov@sfchronicle.com, kfagan@sfchronicle.com Twitter: @KVeklerov, @KevinChron