SAN FRANCISCO — Decades ago, San Francisco's gay and leather culture sought shelter in the city's seedy South of Market district — forced there by brutal police crackdowns on gays.

Over time, the area became a vibrant place teeming with bathhouses and bars that added to San Francisco's reputation as a colorful, free-wheeling refuge open to different sexual lifestyles.

These days, gentrification and skyrocketing rents are threatening to drive the gay and leather crowd out of a neighborhood that's now home to Airbnb, Twitter and high-end condos.

On Tuesday, the San Francisco Board of Supervisors approved a resolution creating the Leather and LGBTQ Cultural District as a way to honor the past and ensure the area remains a refuge.

San Francisco, birthplace of the rainbow gay pride flag, has long welcomed sexual and other minorities. It has several neighborhoods significant to LGBTQ history, including the Castro and Tenderloin, where transgender women fed up with police raids rioted in 1966.

South of Market attracted the leather crowd and remains the site of gay bars and the popular Folsom Street Fair, which draws tens of thousands of people every year dressed in their bondage best. With plenty of tiny leather briefs and bare chests, studded dog collars and whips, the fair is an annual ode to celebrating the San Francisco values of free speech and sexual freedom.

But the scene today is nothing like the bustle in the late 1970s and early 1980s, when more than 50 businesses catered to the leather culture, said Bob Goldfarb, chairman of a community group that supported the resolution.

"It was a lot easier to run into people on the street, if you will, and it had sort of a neighborhood feel even though not a lot of people lived in the area," he said. "This is an opportunity for us to revitalize the area."

According to the resolution, police in the 1960s forced gay businesses from the waterfront to the South of Market area. The first gay leather bar in the area, the Tool Box, became famous when a photo of a mural inside painted by Chuck Arnett was published in a 1964 Life magazine article called "Homosexuality in America."

Behind the leather gear, the community has a rich record of public service. The Folsom Street Fair donates proceeds to public health, arts and human services organizations, as do countless clubs that raise money for nonprofits.

"The leather culture has always been a rock in the community where we will fight for the greater good," said Lex Montiel, co-owner of legendary leather bar SF Eagle.

San Francisco now has five cultural districts, and city leaders are eager to create more as a way to protect and promote longtime businesses, community space and affordable housing. The designation gives a district negotiating rights in future development and access to public money and planning, supporters say.

Other recently created cultural districts include "Calle 24" in the city's traditionally Latino Mission district and SoMa Pilipinas, also in the vast South of Market district. There is also a cultural district in the Tenderloin to honor the 1966 riot at Compton's Cafeteria.

"We're in this period of immense transition and transformation in San Francisco, and many communities in San Francisco are recognizing their unique cultural histories are being lost so we're working to preserve it while we can," said Supervisor Jeff Sheehy, who pushed the leather district proposal along with Supervisor Jane Kim, who represents the area.

The resolution calls on the mayor's office to work with departments to come up with a preservation and promotion plan.