Federal immigration agents fighting on the front lines against the notorious MS-13 gang that's infiltrated a Long Island county will be allowed to remain near the jail they were recently evicted from, officials said.

Nassau County Executive Laura Curran reversed course on Tuesday, hours after a protest, saying the trailer housing six federal U.S. Immigration and Customs Enforcement agents will be relocated from a spot next to the County Correctional Center to a piece of land at the Nassau University Medical Center.

She told Newsday in a statement this decision will “allow Nassau County to continue its work with federal law enforcement to crack down on and deport criminal gang members, while still preserving trust with immigrant communities and complying with the law.”

"This decision is an opportunity to make clear to our immigrant communities that Nassau Police Department is not focused on deportation and that all of our residents should feel safe reporting crimes to the police,” the statement said.

FLASHBACK: MS-13 CRACKDOWN SEVERELY REDUCES GANG'S VIOLENT CRIMINAL ACTIVITY IN NEW YORK STRONGHOLD

Curran ordered ICE to leave the Nassau County jail after a November ruling by the State Supreme Court’s Appellate Division, which found state and local law enforcement cannot arrest or detain immigrants in the country illegally on an ICE warrant for deportation purposes, the newspaper reported. The agents were ordered to leave the jail by Jan. 31.

Law enforcement unions argued that removing ICE agents from the jail would end a 20-year relationship of cooperating and sharing information that worked to keep known gang members off the streets.

Nassau Police Benevolent Association president James McDermott, who led nearly 100 law enforcement union officials to protest Curran’s original decision on Tuesday, said pressure from officials and members of the community, as well as “bad press,” probably pushed Curran to reverse course.

He told “Fox & Friends” that Curran's decision to evict the ICE agents from the jail was “the worse move.”

“By removing ICE by jail – she was more concerned with one group than the whole county. She was more concerned for the criminal than the taxpayers,” McDermott added on Wednesday.

Curran’s spokeswoman Christine Geed told Newsday on Tuesday that Curran’s decision to relocate the ICE agents was not influenced by criticism from public safety labor unions and that the country had not changed its policy.

She said the plan was always for ICE to vacate the jail and that discussions were held to find a new county location for them to relocate. The new building, currently occupied by hospital personnel, is not near civilian foot traffic.

CLICK HERE TO GET THE FOX NEWS APP

The hospital’s chairman told Newsday on Tuesday that ICE agents will not be allowed into the main hospital building.

“The privacy, health, and welfare of our patients are of paramount importance, as well as every Nassau County resident," George Tsunis said. "Every single patient who needs medical care can continue to come to NUMC without fear.”