NEW YORK (CBSNewYork/AP) — New York City officials say they support getting rid of a nearly century-old law that bans dancing at a majority of the city’s bars and restaurants.

Lindsay Greene, a senior adviser to Mayor Bill de Blasio’s administration, said Thursday at a City Council hearing that City Hall supports new legislation that would repeal the cabaret law, which makes dancing illegal without a cabaret license. Out of more than 20,000 bars and restaurants in the city, fewer than 100 actually have the license. Everywhere else, it’s illegal to dance to the music.

READ MORE: NYPD: Delivery Worker Stabbed To Death, E-Bike Stolen Near Sara D. Roosevelt Park

Greene says there are better ways than the current law to create a strong nightlife economy while ensuring safety.

The law was originally enacted in 1926 during Prohibition for mostly racist reasons, reported WCBS 880’s Mike Smeltz. One of those reasons was to prevent people of different races from dancing together, Smeltz reported.

READ MORE: Gabby Petito Foundation Holds Fundraiser On Long Island

Councilman Rafael Espinal, D-Brooklyn, introduced the bill to repeal the law, saying dancing doesn’t need to be licensed.

“It is time we right this historical wrong, and remove New York City’s inappropriate, arbitrarily enforced dancing license,” Espinal said.

If the repeal goes through, in place of the cabaret law would be a requirement that certain places put up security cameras.

MORE NEWS: Police: Suspect In Killing Of New Rochelle Taxi Driver Taken Into Custody After Shootout In Brooklyn

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)