At the height of the AIDS panic, San Francisco forced bathhouses to employ sex "monitors" and tear down walls of rooms. All of the venues shuttered.

A San Francisco official introduced legislation this week that could remove restrictive regulations on bathhouses that have been in place since 1984.

Supervisor Rafael Mandelman, who is gay and represents the Castro District, wants the San Francisco Department of Public Health to throw out longstanding measures that ultimately led to the end of licensed sex clubs in the city.

Thirty-six years ago, the city and county of San Francisco sued the operators of bathhouses, citing them as a "public health nuisance." A judge ruled the bathhouses could remain open if they employed "monitors" who ensured patrons weren't engaging in unsafe sex.

Part of the decree required most walls and doors of individual booths, cubicles, and video rooms to be torn down, so activity would be out in the open and viewable. Later that year, city officials ordered the closure of 14 sex clubs, accusing them of flouting the requirements. The city's remaining bathhouses and sex venues were soon gone, according to Mandelman.

Slightly less restrictive regulations were enacted in 1997, but they still required "monitors" and the removal of all locks on doors.

“Our current regulations for adult sex venues were put in place as an emergency measure at the height of the AIDS crisis when San Francisco was desperate to slow the spread of HIV/AIDS” Mandelman said in a statement. “Decades later, with the emergence of PrEP and in light of San Francisco’s reduction in HIV diagnoses to under 200 for the first time since the 1980s, these regulations — including a ban on private rooms and required monitoring of patrons’ sexual activities — have no public health rationale and need to be changed.”

If successful, the health code could be amended by July. Mandelman hopes the city not only drops the current restrictions on sex venues but also adds requirements like providing condoms and educational materials on STDs.

"When properly operated, by providing access to safer sex educational materials and supplies and HIV and STD testing, these venues assist rather than impede our efforts to control the transmission of HIV," Mandelman said. "I hope that this ordinance will support our efforts to get to zero new HIV infections and will put a bookend on a painful chapter in the history of the queer community in San Francisco."

(RELATED: Can Bathhouses Survive the Age of Grindr?)