The two leading progressive candidates for the Democratic presidential nomination on Wednesday pushed back publicly against efforts to alter New York's new bail law.

Sens. Bernie Sanders and Elizabeth Warren posted to Twitter that it would be a mistake to roll back the law, which ended cash bail for misdemeanor and non-violent felony charges.

"Cash bail is an unreasonably punitive and financially burdensome system that disproportionately victimizes Black and Brown communities," Warren wrote. "Rolling back these reforms would blatantly disregard the voices of New Yorkers who voted to end it."

Sanders pledged to enact a national cashless bail law as president.

"Our cash bail system is a disgrace that disproportionately hurts Black, Brown and poor Americans," he wrote in the tweet. "New York did the right thing by reforming its bail law and must not go backwards."

But Republicans, local law enforcement, and prosecutors have criticized the law, which has led to the release of people facing charges like robbery and manslaughter.

Democratic Attorney General Letitia James said Wednesday it's likely lawmakers will add a judicial discretion component this year. The move would allow judges to consider whether a person is too dangerous to be released from jail while awaiting trial.

State Democratic Committee Chairman Jay Jacobs, in an interview, called it a mistake for lawmakers to not have included the discretion provision.

Still, the criminal justice advocates who had pushed for the changes in the first place, which were designed to keep people from languishing in local jails, are expected to mount a counter effort to keep the measure intact.