A controversial sanctuary policy barring Immigration and Customs Enforcement (ICE) agents from accessing Montgomery County jails in Maryland has been partially rolled back following the arrests of several illegal aliens all charged with rape or sexual abuse in a new bid that will force cooperation between county law enforcement and federal immigration authorities.

Montgomery County Executive Marc Elrich reversed portions of "the Promoting Community Trust Executive Order," which he just signed in July, and will now allow ICE agents access to certain areas of the county jail in order to apprehend illegal aliens, according to reports by ABC7 News.

A county spokesperson confirmed to the local news outlet on Nov. 1 that correctional officers have been ordered to give ICE agents clearance to "identified areas" of the jail to "ensure that transfers are conducted in a safe environment."

FBI OFFERS ASSISTANCE TO MEXICAN AUTHORITIES AFTER DEADLY ATTACK ON AMERICANS

The move walks back an executive order which barred county police from asking individuals about their immigration status and largely prohibited local law enforcement from cooperating with ICE agents, as Elrich reasserted the blue region's stance as a sanctuary city that strongly opposes the Trump administration's hardline policies against illegal immigrants. The policy also banned ICE agents from entering any non-public county facilities.

Only a month after Elrich signed the order, at least nine illegal immigrants were charged with rape and sexual assault between August and September, causing the county executive's office to reevaluate the policy and concede that it had received "numerous phone calls, as well as emails" in light of the arrests.

Although ICE said they "can't speak to Montgomery County's policy," an ICE official told Fox News that "cooperation by local law enforcement is an indispensable component of promoting public safety."

"When some law enforcement agencies fail to honor detainers and release serious criminal offenders, it undermines ICE’s ability to protect public safety and carry out its mission," the official said.

Elrich's office said in August that it cannot honor ICE detainers unless they come with a judicial warrant, causing pushback from immigration experts who point out that under the Immigration and Nationality Act, ICE agents do not need a judge’s signature to issue such a warrant.

"ICE lodges detainers on individuals who have been arrested on criminal charges and who ICE has probable cause to believe are removable aliens," an ICE official told Fox News. "The detainer asks the other law enforcement agency to notify ICE in advance of release and to maintain custody of the alien for a brief period of time so that ICE can take custody of that person in a safe and secure setting upon release from that agency’s custody."

CLICK HERE FOR THE FOX NEWS APP

"It is safer for everyone if we take custody of an alien in the controlled environment of another law enforcement agency as opposed to visiting an alien’s residence, place of work or other public area.  Arresting a criminal in the safety, security, and privacy of a jail is always the best option," they added.

A spokesperson from Elrich's office did not respond to Fox News' request for comment on the amended policy.