Mayor Bill de Blasio on Monday signed legislation that repeals a Prohibition Era law that banned dancing at most nightspots.

The 91-year-old legislation had banned dancing inside nightclubs without a license.

Critics say the law originated as a racist attempt to police Harlem's 1920s jazz clubs, and was enforced unfairly.

The five boroughs are home to more than 20,000 bars and restaurants. Of those, only about 100 actually have a cabaret license due to the expensive and time-consuming application process, according to the mayor's office.

The mayor said the law "just didn't make sense," and that "nightlife is part of the New York melting pot that brings people together.''

The city council voted to repeal the law in October.

Nightlife advocates hailed the repeal, which goes into effect 30 days from Monday.