DENVER (AP) — A new Colorado law says people suspected of being in the country illegally can't be kept in jail simply at the request of immigration officials.

Gov. Jared Polis signed the legislation Tuesday. It will take effect Aug. 2.

By Wednesday afternoon, ICE had fired back against the new law, calling it a "dangerous policy ... that will undoubtedly have tragic future consequences at the expense of innocent citizens," residents living legally in the state and tourists visiting the area.

"By signing Colorado’s House Bill 1124, the state has codified a dangerous policy that deliberately obstructs our country’s lawful immigration system, protects serious criminal alien offenders, and undermines public safety," read a statement from an ICE spokesperson.

Immigration and Customs Enforcement can request that inmates suspected of an immigration violation be kept in jail until immigration agents can arrive to take custody of them. Colorado sheriffs have largely refused to honor such requests after courts ruled that keeping someone jailed without a warrant isn't constitutional. However, two sheriffs were sued last year for holding inmates for ICE.

Colorado Politics reports the bill would have originally barred jail staff from talking with immigration officials but was weakened to satisfy concerns raised by Polis. The law will bar probation officers from providing information to immigration agents.