(Reuters) - A federal judge on Tuesday ruled that U.S. immigration agents could no longer separate immigrant parents and children caught crossing the border from Mexico illegally, and must work to reunite those families that had been split up in custody.

The ruling by U.S. District Judge Dana Sabraw in San Diego came in a lawsuit filed over the family separations by the American Civil Liberties Union.