New York City is poised to move from “Footloose” to fancy-free.

A Brooklyn lawmaker is holding an oversight hearing Monday ahead of a plan to submit legislation that would repeal a nearly century-old law that bans dancing at all but a dozen of the city’s more than 22,000 bars, restaurants and clubs.

The bill by Council member Raphael Espinal (D-Brooklyn) would repeal the infamous 1926 “Cabaret Law,” which requires food and drinking establishments to shell out significant cash and jump through bureaucratic hoops to get a license that allows dancing.

The law was most recently invoked by former Mayor Rudy Giuliani to justify a crackdown on nighttime quality of life concerns in the 1990s — while drawing unfavorable comparisons between the city that never sleeps and the fictional town in the 1984 film “Footloose.”

“The premise of ‘Footloose’ was that you couldn’t dance in the town, and here we are in New York City telling businesses and patrons they’re not protected by the First Amendment — and we have a law on the books denying them the opportunity to dance,” said Espinal.

He said he first got interested in repealing the law after reading about its racially-prejudiced origins, which included a bid to prevent interracial mingling in Harlem and other neighborhoods.

Espinal says the safety regulations in the law are duplicative of other health and buildings rules, but that he would make sure they were preserved in companion legislation.

He could not say when a bill would be introduced.

A spokeswoman for the Department of Consumer Affairs, which regulates cabaret licenses, said only 97 establishments currently have them.

It takes more than a soft shoe to get one.

Establishments have to spend big bucks on safety measures, including hiring a security guard and installing digital cameras.

Advocates say the law has historically served as a tool for the city to haphazardly crack down on any nightlife activities that officials deem objectionable.

Asked for data about recent enforcement, the DCA spokeswoman declined to provide it, citing pending litigation.

In October 2014, lawyer and bar owner Andrew Muchmore filed a lawsuit in Brooklyn federal court challenging the constitutionality of the cabaret law.

The de Blasio administration fought back — at times sounding as though it were channeling the conservative townspeople in “Footloose.”

“There is no protected First Amendment right of expression to engage in recreational dancing,” city lawyers wrote in June 2015.

Owners and advocates with the recently-formed Dance Liberation Network, who have brought significant attention to the issue this year, say they’re hearing that the city has been softening its stance on the law — at least behind closed doors.

“They don’t like to speak on the record about why they’re preserving it,” said John Barclay, a venue operator with Dance Liberation Network. “They’ve been great at dodging this. But they know they’re not going to be able to dodge it for much longer.”