California will become the first state in the nation to abolish bail for suspects awaiting trial under a sweeping reform bill signed by Gov. Jerry Brown on Tuesday.

An overhaul of the state’s bail system has been in the works for years, and became an inevitability earlier this year when a California appellate court declared the state’s cash bail system unconstitutional. The new law goes into effect in October 2019.

“Today, California reforms its bail system so that rich and poor alike are treated fairly,” Brown said in a statement, moments after signing the California Money Bail Reform Act.

The governor has waited nearly four decades to revamp the state’s cash bail system. In his 1979 State of the State Address, Brown argued the existing process was biased, favoring the wealthy who can afford to pay for their freedom, and penalizing the poor, who often are forced to remain in custody.

“Our path to a more just criminal justice system is not complete, but today it made a transformational shift away from valuing private wealth and toward protecting public safety,” Sen. Robert Herzberg, a co-author of the bill, said in a statement. “California will continue to lead the way toward a safer and more equitable system.”

Washington, D.C., already has a cashless bail system. Other states, including New Jersey, have passed laws that reduce their reliance on money bail. And other states are considering making similar changes.

Under the California law those arrested and charged with a crime won’t be putting up money or borrowing it from a bail bond agent to obtain their release. Instead, local courts will decide who to keep in custody and whom to release while they await trial. Those decisions will be based on an algorithm created by the courts in each jurisdiction.