Overturning a 91-year-old rule that has long bedeviled nightclub owners in New York, city lawmakers have voted Tuesday to repeal the “cabaret law,” according to The Associated Press. The law prohibited dancing in bars and restaurants that did not possess a cabaret license.

The repeal will go to Democratic Mayor Bill de Blasio, who has said he supports it.

The law was created during the Prohibition era to curb speakeasies and, many contend, to repress Harlem’s booming jazz clubs of the era. While enforced inconsistently in recent years, the law was used frequently by the Rudolph Giuliani administration to crack down on city nightclubs during the 1990s in an effort to curb drug use. It was at times used as a reason to shut down establishments for quality-of-life reasons or that law-enforcement officials suspected of other offenses.

According to the New York Times, only 97 out of roughly 25,000 eating and drinking establishments in the city have a cabaret license, which is complicated and expensive to obtain.

A spokesman for the mayor, Ben Sarle, told the Times, “The mayor strongly supports repealing the law,” though he stressed the need to retain some of its security requirements, such as mandatory security cameras and certified security guards at larger venues. Those provisions were added to the existing law over the past 15 years.

The repeal will go into effect 30 days after it is signed.