This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A federal judge says authorities can’t transfer immigrants from two Southern California detention centers to far-flung facilities if they have lawyers in the area.

The American Civil Liberties Union of Southern California says U.S. District Judge Jesus Bernal in Riverside ruled Thursday in response to a lawsuit.

The suit sought to prevent Immigration and Customs Enforcement from moving several hundred immigrants at two Orange County facilities away from attorneys and relatives.

The sheriff’s department in March said it would stop housing detainees and ICE said they would be moved farther away.

Bernal said detainees with attorneys can’t be transferred beyond the greater Los Angeles area but didn’t block transfers for those without lawyers.

ICE has a privately-run facility in Adelanto.

A message was left for U.S. Immigration and Customs Enforcement.