Protesters carry signs and chant slogans to protest against Attorney General Jeff Sessions and the Trump administration's policies in advance of his noontime address at the Criminal Justice Foundation's annual luncheon meeting in Los Angeles in front of Federal Courthouse in Los Angeles on Tuesday, June 26, 2018. Immigrant-rights advocates asked a federal judge to order the release of parents separated from their children at the border, as demonstrators decrying the Trump administration's immigration crackdown were arrested Tuesday at a rally ahead of a Los Angeles appearance by Attorney General Jeff Sessions. (AP Photo/Richard Vogel)

MCALLEN — A judge in California on Tuesday ordered U.S. border authorities to reunite separated families within 30 days, setting a hard deadline in a process that has so far yielded uncertainty about when children might again see their parents.

If children are younger than 5, they must be reunified within 14 days of the order issued Tuesday by U.S. District Judge Dana Sabraw in San Diego. Sabraw, an appointee of President George W. Bush, also issued a nationwide injunction on future family separations, unless the parent is deemed unfit or doesn't want to be with the child. He also requires the government provide phone contact between parents and their children within 10 days.

More than 2,000 children have been separated from their parents in recent weeks and placed in government-contracted shelters — hundreds of miles away, in some cases — under a now-abandoned policy toward families caught illegally entering the U.S.

Amid an international outcry, Trump last week issued an executive order to stop the separation of families and said parents and children will instead be detained together. A Department of Homeland Security statement over the weekend on reuniting families only seemed to sow more confusion.

"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."

The ruling was a win for the American Civil Liberties Union, which filed the lawsuit in March involving a 7-year-old girl who was separated from her Congolese mother and a 14-year-old boy who was separated from his Brazilian mother.

"Tears will be flowing in detention centers across the country when the families learn they will be reunited," said ACLU attorney Lee Gelernt.

The Justice and Homeland Security Departments did not immediately respond to requests for comment late Tuesday.

It's not clear how border authorities will meet the deadline. Health and Human Services Secretary Alex Azar told Congress on Tuesday that his department still has custody of 2,047 immigrant children separated from their parents at the border. That is only six fewer children than the number in HHS custody as of last Wednesday. Democratic senators said that wasn't nearly enough progress.

Under questioning, Azar refused to be pinned down on how long it will take to reunite families. He said his department does extensive vetting of parents to make sure they are not traffickers masquerading as parents.

Also challenging will be the requirement the judge set on phone contact.

At a Texas detention facility, immigrant advocates complained that parents have gotten busy signals or no answers from a 1-800 number provided by federal authorities to get information about their children.

Attorneys have spoken to about 200 immigrants at the Port Isabel detention facility near Los Fresnos, Texas, since last week, and only a few knew where their children were being held, said Simon Sandoval-Moshenberg of the Legal Aid Justice Center in Virginia.

"The U.S. government never had any plan to reunite these families that were separated," Sandoval-Moshenberg said, and now it is "scrambling to undo this terrible thing that they have done."

A message left for HHS, which runs the hotline, was not immediately returned.

Many children in shelters in southern Texas have not had contact with their parents, though some have reported being allowed to speak with them in recent days, said Meghan Johnson Perez, director of the Children's Project for the South Texas Pro Bono Asylum Representation Project, which provides free legal services to minors.

"Things might be changing now. The agencies are trying to coordinate better," she said. "But the kids we have been seeing have not been in contact with the parents. They don't know where the parent is. They're just distraught. Their urgent need is just trying to figure out, 'Where is my parent?'"

The decision comes as 17 states, including New York and California, sued the Trump administration Tuesday to force it to reunite children and parents. The states, all led by Democratic attorneys general, joined Washington, D.C., in filing the lawsuit in federal court in Seattle, arguing that they are being forced to shoulder increased child welfare, education and social services costs. The Justice Department did not immediately respond to a request for a comment on the multistate lawsuit.

"The administration's practice of separating families is cruel, plain and simple," New Jersey Attorney General Gurbir Grewal said in a statement. "Every day, it seems like the administration is issuing new, contradictory policies and relying on new, contradictory justifications. But we can't forget: The lives of real people hang in the balance."

In a speech before the conservative Criminal Justice Legal Foundation in Los Angeles, U.S. Attorney General Jeff Sessions defended the administration for taking a hardline stand on illegal immigration and said the voters elected President Donald Trump to do just that.

"This is the Trump era," he said. "We are enforcing our laws again. We know whose side we are on — so does this group — and we're on the side of police, and we're on the side of the public safety of the American people."

After expressing reluctance in May to get too deeply involved in immigration enforcement decisions, the judge who issued Tuesday's ruling was clearly influenced by Trump's reversal last week and the Homeland Security Department's statement on its family reunification plan Saturday night, which, he said, left many questions unanswered.

"This situation has reached a crisis level. The news media is saturated with stories of immigrant families being separated at the border. People are protesting. Elected officials are weighing in. Congress is threatening action," he wrote.

Outraged by the family separations, immigrant supporters have led protests in recent days in states such as Florida and Texas. In Los Angeles, police arrested 25 demonstrators at rally Tuesday ahead of Sessions' address.

Outside the U.S. attorney's office, protesters carried signs reading, "Free the children!" and "Stop caging families." Clergy members blocked the street by forming a human chain. Police handcuffed them and led them away.

Later, protesters gathered outside the hotel where Sessions gave his speech. As the attorney general's motorcade arrived, the crowd chanted, "Nazi, go home."

AP