The California state legislature voted Wednesday to ban for-profit private prisons, including some facilities used by U.S. Immigration and Customs Enforcement.

The bill, which must be signed into law by California Gov. Gavin Newsom in order to take effect, would ban new contracts with private prison facilities in California starting next year, and would phase out their use entirely by 2028. It would also prohibit the California Department of Corrections and Rehabilitation from imprisoning people at for-profit facilities outside of the state.

Newsom’s office declined to say whether he will sign the bill, but the governor has previously signaled his support for abolishing private prisons. “We will end the outrage of private prisons once and for all,” he said in his inaugural address this January.

The legislation was originally intended to ban only contracts between California’s Department of Corrections and Rehabilitation and for-profit prisons, but was amended in June to ban all for-profit facilities in the state, including those used by ICE.

Assemblyman Rob Bonta, the bill's author, told NBC News, “These Wall Street-owned for-profit, private facilities inhumanely treat people as commodities. Profiteering on the backs of people who are incarcerated is not only morally wrong, but inhumane and contrary to our California values.”

A spokesperson for the GEO Group, a for-profit prison company with dozens of facilities in California, said, "Unfortunately, AB 32 works against the state’s Proposition 57 anti-recidivism goals approved by the voters," referring to a ballot proposition passed in 2016 to reduce recidivism in the state.

As of June, an estimated 2,222 people incarcerated by the state of California were held in for-profit facilities, according to statistics obtained by The Guardian. In August, around 1,300 people were being held at privately-run ICE detention centers in California, according to ICE statistics.

"We don't comment on pending legislation," said Bryan D. Cox, acting press secretary for ICE. "But any person under the impression that a state law in any way binds the hands of a federal law enforcement agency which manages a national network of detention facilities would be a false impression."