Following a blitz of federal lawsuits filed yesterday by a group of Democratic attorneys general from 17 states and Washington, DC, a federal judge ruled Tuesday that US immigration agents can no longer separate immigrant parents and children caught crossing over the US-Mexico border, and also that the US government is responsible for reuniting families split up in custody, according to Reuters.

US District Court Judge Dana Sabraw, an appointee of President George W Bush, granted the preliminary injunction to the ACLU, which had filed a lawsuit back in March addressing the separation of illegal alien families.

The government now has 14 days to reunite children who are younger than five, and 30 days to reunite all other minors with their families. More than 2,300 children have been taken into US custody since President Trump first announced his "zero tolerance" border policy in early May.

The ACLU filed its lawsuit on behalf of a woman who was separated from her six-year-old daughter after arriving in the US in November to escape religious persecution in the Democratic Republic of Congo, the Guardian reported. The organization is seeking class-action status on behalf of immigrants and asylum seekers, it said in its lawsuit.

Lawyers for the government had urged the judge not to issue the injunction, arguing that the executive order issued by President Trump last week to end the separations largely addressed the issue of reuniting families. But the court disagreed.

"The facts set forth before the court portray reactive governance responses to address a chaotic circumstance of the government’s own making," Sabraw wrote. "They belie measured and ordered governance, which is central to the concept of due process enshrined in our Constitution."

It's unclear how the government will accomplish this goal. HHS Secretary Alex Azar told Congress on Tuesday that his department still had custody of 2,047 children separated from their parents at the border. That is only six fewer children than last week. Azar refused to say how long it would take the government to reunite the families, given that extensive vetting will be required of parents to make sure they are not child traffickers.

However, attorneys working with the families told the Guardian that only a small fraction of parents know where their children are being held. "The US government never had any plan to reunite these families that were separated," said an attorney with the Legal Aid Justice Center in Virginia.