The court particularly required the US federal officials to reunify all parents with their children aged under 5 within two weeks, and reunify parents with their children aged 5 and older within 30 days. The ruling did not imply, however, that the US authorities must halt a prosecution of individuals who had crossed the US border illegally, according to the CNN broadcaster.
The next hearing of the case is scheduled for July 6, according to the broadcaster.
Earlier in June, Trump signed an executive order to end family separations but it did not provide instructions or a plan for how to reunite those who were already separated.
In February, The American Civil Liberties Union referred the case against the Trump administration on behalf of a woman from a Democratic Republic of Congo seeking asylum in the United States, who was split from her 7-year-old child.
The nonprofit organization now represents a wider group of plaintiffs, the TV channel reported.