Randy Shaw moved quickly from law school into his first job as an advocate at the Tenderloin Housing Clinic.

Four decades later, he’s still working for tenant rights and progressive housing policy from one of San Francisco’s poorest neighborhoods.

Shaw, the executive director of the nonprofit clinic, is the author of the new book, “Generation Priced Out: Who gets to live in the new urban America.” He explores the housing policies and political forces pushing rents and home prices ever higher, making it ever more difficult for young workers and middle class families to buy homes.

The Ghost Ship fire in Oakland was a tragic sign of failed policy, Shaw said. Housing policy had become so broken, he said, that young workers and artists could no longer find safe housing in the Bay Area’s most historically affordable cities.

But he’s optimistic that new Governor Gavin Newsom and a groundswell of political activism by housing advocates and tenants can bring new policy.

“Sacramento needs to provide more affordable housing funds,” Shaw said. “The change in the governor has absolutely enormous implications for housing and homeless funding.”

This interview has been lightly edited for clarity and length.

Q: How did we get into this housing crisis?

A: We got here, in California, for not building when we had significant population increases and job growth. For decades, we didn’t build housing. In terms of the reason — why didn’t we build housing — my book is really the first that highlights the homeowner opposition to apartments, and down-zoning, as the major driving force for urban gentrification.

When I started looking at city after city across the country, but particularly in California — Los Angeles, Berkeley, Oakland, post-Silicon Valley, outside of San Jose — you find one of the reasons we didn’t build enough housing is because, after building tons of housing in the 1950s, we decided in the 70s, and the 80s, and 90s not to allow any apartments to be built in vast stretches of the city.

Prices go up. It’s like a game of musical chairs.

Q: You trace some of these problems back to the well-meaning protests against gentrification in the 1970s. What happened?

A: There’s ample evidence in cities across the country where it was racially-based to keep blacks out. But that isn’t what happened in places like Berkeley.

What it really was about in many cities was keeping renters out. The first neighborhood preservation ordinance in the United States passed in Berkeley in 1973. It was very well-meaning.

We had just gone through the crisis of urban renewal in the 1960s, where entire neighborhoods were shut down by bulldozer. It came to be this view that people living in neighborhoods needed to preserve their neighborhoods against the bulldozers.

When it’s the government demolishing vast stretches of housing, that makes perfect sense. But when I went back and looked at the actual, original neighborhood preservation ordinance, which was passed by very politically progressive people, it specifically talks about trying to stop apartments from being built.

This idea that neighborhood preservation and neighborhood character mean “don’t allow apartments to be built, don’t allow renters to live here,” has been maybe the single most destructive thing that has caused the housing crisis in city after city.

Q: You looked at Seattle, Minneapolis, Austin, New York and Los Angeles and several other places. What are some of the common themes you saw?

A: Outside of New York City, which doesn’t have this issue as much…homeowner groups have down-zoned so much of the land that apartments are either prohibited or they’re not economically viable because the height limit is so low. When you have a 30-foot height limit, it’s very difficult to financially build on a major transit corridor.

These zoning laws have not occurred just randomly. They were aggressively pushed for and they’re aggressively maintained. Now we’re finally at a period things have gotten so bad, and the middle class is so displaced from the cities they used to build, that finally, we’re seeing a turn. And the millennials are leading the effort.

Finally, there’s a counterbalance at these land-use hearings. It’s not just homeowners saying stop development. It’s people saying, “We need housing.”

We’re seeing a real tidal wave of momentum; 2018 was a real turning point.

Q: What has happened in Minneapolis?

A: You think of Minneapolis, you think of a very polite society. In my book, I describe a videotape of a (public) hearing, where one woman broke down and cried over this potential (apartment) project. You had people talking about how there was going to be an increase in 311 emergency calls.

If you didn’t know, you’d think they were trying to put a homeless shelter in a residential neighborhood, or maybe a prison halfway house, or a drug rehab center. Actually, it was a 10-unit, market-rate apartment building in a neighborhood that was 80-percent renter.

The huge irony here is that all of these neighborhoods that have banned apartments…already have apartments.

It’s really a very elitist, and in many cases racist, and very exclusionary set of land use policies. The cities that we’re talking about all claim to promote inclusion and diversity.

We’re not talking about Palo Alto, which basically doesn’t care about having low-income people. We’re talking about San Francisco, Seattle, Berkeley, Oakland, Portland, Austin, Minneapolis and Los Angeles.

Randy Shaw

Position: Executive director of the Tenderloin Housing Clinic; editor of the online publication, Beyond Chron.

Age: 62. Born and grew up in Los Angeles

Education: Cal Berkeley, Hastings School of Law

Home: Berkeley

Family: Wife, two grown children

Five things about Randy Shaw

1. He got involved in landlord and tenant issues as an undergraduate at Cal.

2. Research for his book led him to look into housing policy in Austin, Texas, Seattle, Minneapolis and Los Angeles — where he found similarities to the problems facing the Bay Area.

3. He’s an avid gardener and traveler with his wife, also an attorney.

4. He’s been amazed by his travels to Europe — particularly Paris and Berlin — where cities are friendlier to bikes and pedestrians. “Europe has done a much better job,” he said. “Cities are made for people, not cars.”

5. He recently worked with Salesforce CEO Marc Benioff and San Francisco Mayor London Breed to turn the shuttered and notorious Bristol Hotel in the Tenderloin into an SRO building for the poor. Benioff and his wife donated $6.1 million for the effort.