The City Council voted Wednesday, with a veto-proof majority, to ban most uses of solitary confinement in city jails.

The law prevents jails from holding a detainee alone in a cell beyond a four-hour de-escalation period and only in the case of emergencies.

Critics, including the mayor, said the law will undermine the ability of correction officers to do their jobs, while advocates argue solitary is harmful to the physical and mental wellbeing of detainees.

Meanwhile, the future of the city's jails remains uncertain, as a possible takeover looms.

Last week, a federal judge found the Department of Correction in contempt over violating orders.

City Council Member Tiffany Cabán, chair of the Women and Gender Equity Committee, who represents Rikers Island and the neighborhoods of Astoria, Woodside and East Elmhurst, joined Errol Louis on “Inside City Hall” Thursday to talk more about the new legislation.

“[Solitary confinement] doesn’t make it any more safe for anyone on [Rikers Island], whether you’re a civilian employee, an incarcerated person, a correction officer,” Cabán said.  “We know there are other things we can do to reduce violence on Rikers Island.”