Los Angeles (AFP) - California became the first "sanctuary state" for undocumented immigrants Friday, a decision criticized by the Trump administration which believes the move will compromise security.

California's governor, Democrat Jerry Brown, signed the landmark legislation -- Senate Bill 54 (SB54) -- which grants better protections to people who are in the US without permission, including those who have committed crimes.

It also limits cooperation between local police forces and federal authorities in operations to track down undocumented immigrants.

The legislation, which will come into effect on January 1, 2018, is part of a series of laws which protect the almost 3 million undocumented immigrants living in California -- most of whom are from Mexico and Central America.

Brown insisted in his signing statement the measure will not "prevent or prohibit Immigration and Customs Enforcement (ICE) or the Department of Homeland Security from doing their own work in any way" -- but it will stop local authorities from assisting.

"They are free to use their own considerable resources to enforce federal immigration law in California," he wrote, adding that the new legislation will not deny ICE access to prisons.

But in a statement, ICE acting director Tom Homan responded: "The governor is simply wrong."

The law will "undermine public safety and hinder ICE from performing its federally mandated mission," Homan said.

"Ultimately, SB54 (...) creates another magnet for more illegal immigration," he insisted, adding ICE will have "no choice but to conduct at-large arrests in local neighborhoods and at worksites, which will inevitably result in additional collateral arrests."

ICE said it will also likely send immigrants arrested in California to detention centers outside of the state, "far from any family they may have in California."

A number of cities in California, such as Los Angeles and San Francisco, have already banned police officers from collaborating with ICE on operations to capture undocumented immigrants.

Last week, ICE detained 450 undocumented immigrants in the United States -- 101 of whom were in Los Angeles.

The bill signed into law by Brown also includes assistance for students and measures to combat abuse of tenants.