Washington(CNN) Illinois Democratic Gov. JB Pritzker signed a bill on Friday that bans private immigration detention centers in the state, making it the first in the nation to forbid the practice, according to a release from the governor's office.

Pritzker signed the legislation, HB 2040, as part of a three-part package to protect undocumented immigrants, as the state braces for Immigration and Customs Enforcement raids that are expected in Chicago and nine other major cities starting Sunday.

Private detention centers have become popular, particularly close to the southern border, as Customs and Border Protection struggles to deal with the influx of migrants and refugees entering the United States. The private-prison industry as a whole is benefiting from Trump's border policies. But those lucrative business opportunities are also drawing increased public and legal scrutiny of a system that, advocates charge, treats detainees cruelly.

According to a statement from Pritzker's office, he also signed HB 1637, which prohibits local law enforcement from working with federal immigration enforcement and from removing undocumented immigrants from the US. The third piece of legislation in the package was HB 2691, which allows undocumented immigrants in Illinois to qualify for state financial aid, the release says.

After President Donald Trump tweeted on Monday that an operation to deport "millions" of undocumented immigrants was imminent, a senior immigration official told CNN that ICE was moving forward with a raid on Sunday that is expected to target families with court-ordered removals -- about 2,000 people in 10 cities.

Chicago Mayor Lori Lightfoot announced Friday that the Chicago Police Department will not cooperate with the ICE raids, adding that "Chicago will always be a welcoming city and a champion for the rights of our immigrant and refugee communities."

Chicago has previously declared itself a "sanctuary city," a broad term applied to jurisdictions that have policies in place designed to limit cooperation with or involvement in federal immigration enforcement actions.