California state and local law enforcement agencies may have to choose between more than $100 million in federal aid and the “sanctuary city” immigration policies that supporters say are humane, but critics say fuel crime.

The policies, whether in writing or just in practice, preclude local law enforcement from working with federal authorities when they catch an illegal immigrant who by law faces deportation. The laws have sparked a national controversy in the wake of dozens of murders and other violent crimes committed by illegal immigrants who local law enforcement did not report to the Department of Homeland Security.

Republicans in Congress, saying such non-cooperation is illegal, forced the Department of Justice to condition grants on compliance. For California, which enacted the California Trust Act, that could mean as much as $135 million in grants will be withheld.

“This irresponsible legislation has already caused the release of thousands of criminals that U.S. Department of Homeland Security Immigration and Customs Enforcement was trying to deport,” said Jessica Vaughan, director of policy studies for the Washington DC-based Center for Immigration Studies. “Now it may also cost California police and sheriffs critical funding from the federal government. Last year, these grants were worth more than $130 million.”

Vaughan said that she suspects, at least in California where this has been a contentious issue, many sheriffs and police departments are going to have to notify the state government that the Trust Act puts them in an extremely difficult position.

‘If I were a sheriff, I’d be thinking about starting to comply with federal law and cooperating with ICE, and the heck with the Trust Act – it’s been declared illegal,” Vaughan said.

Although the Obama administration and Attorney General Loretta Lynch have not objected to sanctuary city policies, Congress instructed the Department of Justice’s Inspector General to monitor compliance.

The department’s independent watchdog said in a report released Thursday that the number of sanctuary cities has increased dramatically over the last decade, with local law enforcement cooperation with the federal authorities decreasing.

In some situations, federal agencies pay for illegal immigrants to be held in local jails, only to be turned away when they come to deport the prisoners, the report said.

“The findings are pretty clear — these are sanctuaries and they are violating federal law,” Vaughan said. “They should change their policies before more people get killed, and if they don’t, they should be debarred from DOJ grants.”

Defenders of sanctuary policies say they protect immigrants from deportation and reduce illegal immigrants’ fear of cops. But critics, including Homeland Security Department officials say releasing illegal immigrant criminals inside the U.S. is dangerous.

Claude Arnold, a retired U.S. Immigration and Customs Enforcement special agent in charge of Homeland Security Investigations, said sanctuary advocates claim immigration enforcement is the exclusive responsibility of the federal government, however enacting laws like the California Trust Act, which dictates how the federal government can enforce the law, contradicts those claims and can be devastating consequences.

The murder of 32-year-old Kathlene Steinle’s in June 2015 by Juan Francisco Lopez-Sanchez, an illegal immigrant from Mexico, is a prime example, Arnold said. Steinle was shot dead while strolling on San Francisco’s Embarcadero with her father. The alleged shooter, a felon and five-time deportee, has pleaded not guilty to murder charges, claiming the shooting was an accident. Those responsible for releasing him not long before the shooting despite a federal request to detain him for deportation should also have consequences, Arnold said.

"When sanctuary jurisdictions like San Francisco County release criminals that officials know are in the U.S. illegally, and those criminals commit heinous crimes, those responsible should be federally prosecuted,” Arnold told FoxNews.com and also wrote in a WSJ oped. “At the very least, sanctuary jurisdictions that defy federal law should not receive federal funding."

Rep. John Abney Culberson, R-Texas, said cities and states that embrace sanctuary policies can be stripped of federal grants, including the entire states of Connecticut and California, as well as Las Vegas, Milwaukee, Miami, Chicago, New Orleans, New York and Philadelphia, which were audited in the Inspector General report.

“If these ten jurisdictions do not repeal their sanctuary policies to comply with this federal immigration law, they will not be eligible for Byrne-JAG and State Criminal Alien Assistance Program (SCAAP) law enforcement grants and could be subject to civil and criminal penalties,” Culberson said in a statement. “Under the new Department of Justice grant guidelines, these ten jurisdictions will now have to choose between receiving law enforcement grant money or protecting criminal illegal aliens. They can no longer do both. If these jurisdictions refuse to comply they could also be forced to repay every dollar they have received from these grant programs.”

Inspector General Michael Horowitz said in his report that based on his agency’s discussions with ICE officials about the impact these laws and policies were having on their ability to interact with local officials, as well as the information reviewed, “these policies and others like them may be causing local officials to believe and apply the policies in a manner that prohibits or restricts cooperation with ICE in all respects… That, of course, would be inconsistent with and prohibited by Section 1373.”

Jurisdictions in violation varied in their policies. “While some of the areas examined would honor detainers under specific circumstances, such as prior felony convictions, gang membership, or presence on a terror watch list, others will not honor a civil immigration detainer request, standing alone under any circumstances,” Horowitz wrote.

The mayor of Chicago, the IG report noted, has been defiant, stating publicly, “we are not going to turn people over to ICE, and we are not going to check their immigration status. We will check for criminal background, but not for immigration status.”

“This is a big deal,” said Vaughan. “This OIG report is the clearest statement yet from the federal government that sanctuary policies like California’s and Chicago’s obstruct immigration enforcement and violate federal law.”

These 10 cities and states are not alone. According to a January 2016 Center for Immigration Studies report cited by Congress, there are over 300 sanctuary cities that refuse to comply with ICE detainers or are otherwise impeding information sharing with federal immigration officials. Congress has identified at least 140, and ICE reported there are at least 155.

“The DOJ is going to have to let them know that they need to either change their sanctuary policy or lose their funding, and if they try to have it both ways, they could face prosecution based on their false claim to the government,” Vaughan said.