OAKLAND, Calif. — In the aftermath of a fire that killed 36 people here last Friday night, fire departments around the country have begun to investigate and in some cases evict residents from illegally occupied warehouses.

Cities are calling on neighbors to report buildings they suspect might be giving parties like the one that took place the night of the fire at an Oakland warehouse known as the Ghost Ship, while concert promoters report a broad crackdown on illegal spaces around the country.

“I knew there would be this wave, but it happened a lot faster than I thought,” said Forest Juziuk, a Detroit-based booker for electronic musicians like those who played at the warehouse where the fire occurred. “By Tuesday night I started seeing text messages from around the U.S. about fire marshals coming through and eviction notices being served.”

In the days since the fire, there have been reports of event spaces being scrutinized or shut down in cities like Nashville, Philadelphia, Dallas, Austin, Indianapolis, New Haven and Dubuque. The question now is whether the tragic fire in Oakland will become a national turning point that forces these spaces out of business, or if it will push them deeper into the shadows.

Over the past few decades, many of America’s once-gritty cities have seen a profound revitalization in which decaying industrial buildings have been turned into residences, artists’ lofts and gallery spaces. These buildings often serve as sources of affordable housing and profit, while providing walls and stages for an underground circuit of artists and musicians.

“You have spaces that are not being used in a particular area, and urban entrepreneurship fills the space,” said Edward Glaeser, a Harvard economist who studies cities. “It’s something we love about cities, but it’s a constant battle between urban creativity and the attempt of regulators to impose controls on it.”

The warehouses in Oakland are similar to ones nationwide that struggle with this dynamic. Residents of several illegally occupied warehouses, some who spoke on the condition of anonymity for fear of eviction, reported landlord visits, insurance inspections and 60-day eviction notices being handed out to friends in the past few days.

“I woke up Monday morning to my roommates telling me that the fire marshal was here,” said a man who gave his name as Qué Pequeño, 25. He described himself as a D.J., event promoter and multimedia artist who lived in an artists’ space in Baltimore called the Bell Foundry.

“They deemed our place unsafe and that it was not up to code,” he said.

Roman Clark, a spokesman for the Baltimore Fire Department, said a complaint on Monday had prompted the investigation. Both the Fire and Housing Departments investigated the building and found numerous safety and housing violations.

“The Housing Department condemned the building and boarded it up,” Mr. Clark said.

No city officials are going to say they approve of illegal parties held in decrepit warehouses, but some acknowledge privately that underground spaces are part of how cities work and are likely to remain so.

In the aftermath of the Oakland fire, Mayor James Kenney of Philadelphia and the commissioner of the Department of Licenses and Inspections sent out a joint news release calling on warehouse owners and managers to make sure their spaces are safe.

The city’s Office of Arts, Culture and the Creative Economy said in a statement that it “understands that artists are resourceful in identifying spaces that meet their distinct, creative needs,” adding, “our priority remains their and the public’s safety.”

“We are concerned about exactly what happened in Oakland,” said Karen Guss, a spokeswoman for the Licenses and Inspections Department, but “there is no way this city or any city of size is going to be able to address these issues on their own.”

New York also has a long history of transforming buildings and warehouses into arts and music spaces. But gentrification of the areas most fertile to the enterprise — like Bushwick, an industrial pocket of Brooklyn — means that semipermanent spaces similar to the Ghost Ship have become rarer.

A task force that inspects legal and illegal spaces for compliance was convened after the Happy Land Social Club in the Bronx was set on fire in 1990, killing nearly 90 people. This September, officials from the Police, Fire and Buildings Departments descended upon the abandoned Gowanus Bay Terminal, where a party for 4,500 people was to be held. After an inspection, it was determined unsafe and the party was canceled, according to a spokeswoman for the mayor. Over the summer, a 6,000-person site in East Williamsburg was shut down permanently after repeated violations.

In interviews, warehouse dwellers from around the country said they were well aware that their living choices posed a risk. And yet they stay, because the rent is cheap and because there are not many legitimate housing options where they can play drums, fix motorcycles or use a blowtorch, 20 feet from their beds.

“People will always seek what spaces like Ghost Ship offer,” Aaron Muszalski, an artist who has spent the past two decades living and working in warehouses across the Bay Area. “What we need are solutions that don’t seek to eradicate these spaces, but which allow them to come safely into the light and support them economically in becoming safer and more accountable — something that is impossible so long as we pretend they don’t exist.”

For now, however, Oakland artists are hunkering down. Fearing eviction, they have tried to impose a sort of collective media blackout by encouraging anyone talking about the fire to make their social media posts private or to refrain from posting entirely.

“Please don’t name or draw attention to other artist housing in our community,” read a post on one private forum. “The last thing we need is more members of our community thrown out on the streets.”

Others are trying to mitigate the safety risks, but, true to form, they are organizing their efforts in the same manner as they might an underground techno show: in private, with discretion and the hope that it can all be handled in-house.

In private Facebook groups and at an impromptu town hall meeting of warehouse dwellers that was held Wednesday night in Berkeley, Calif., residents exchanged advice with neighbors on how to arrange discreet inspections or buy fire extinguishers.

These efforts quickly ballooned into a national project. Within days of the Oakland fire, a website called Saferspac.es popped up to help tenants find fire safety advice and financial help. The organizer, Melissa J. Frost, does not live in Oakland, but is a Philadelphia architect who said in an interview that she had lived in illegal warehouses.

“This is for all of us who understand that the fire in Oakland was not an unlikely accident, but rather an inevitability given the dangerous precarity of the spaces in which underground D.I.Y. culture exists nationally,” Ms. Frost wrote in a post introducing the site. “This is for everyone waiting to see these communities flourish and wanting to see to it that this does not happen again.”

A version of this article appears in print on , on Page A15 of the New York edition with the headline: Oakland Fire Leads Cities to Scrutinize Artists’ Spaces. Order Reprints | Today’s Paper | Subscribe