President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
Pablo Martinez Monsivais/AP
President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
Now playing
01:52
Trump signs executive order to end family separations
CNN
Now playing
01:23
Senator: Family separation is kidnapping
SAN DIEGO, CA - JULY 16:  An American flag flies along a section of the U.S.-Mexico border fence on July 16, 2018 in San Diego, California. The entire Southwest border saw 34,114 U.S. Border Patrol apprehensions in the month of June compared with 40,338 in May.  (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images North America/Getty Images
SAN DIEGO, CA - JULY 16: An American flag flies along a section of the U.S.-Mexico border fence on July 16, 2018 in San Diego, California. The entire Southwest border saw 34,114 U.S. Border Patrol apprehensions in the month of June compared with 40,338 in May. (Photo by Mario Tama/Getty Images)
Now playing
03:57
Hear: Immigrant moms plead with judge for kids
U.S. Border Patrol agents take a father and son from Honduras into custody near the U.S.-Mexico border on June 12, 2018 near Mission, Texas. The asylum seekers were then sent to a U.S. Customs and Border Protection (CBP) processing center for possible separation. U.S. border authorities are executing the Trump administration's zero tolerance policy towards undocumented immigrants. U.S. Attorney General Jeff Sessions also said that domestic and gang violence in immigrants' country of origin would no longer qualify them for political-asylum status. John Moore/Getty Images
John Moore/Getty Images
U.S. Border Patrol agents take a father and son from Honduras into custody near the U.S.-Mexico border on June 12, 2018 near Mission, Texas. The asylum seekers were then sent to a U.S. Customs and Border Protection (CBP) processing center for possible separation. U.S. border authorities are executing the Trump administration's zero tolerance policy towards undocumented immigrants. U.S. Attorney General Jeff Sessions also said that domestic and gang violence in immigrants' country of origin would no longer qualify them for political-asylum status. John Moore/Getty Images
Now playing
01:26
Parents of 71 children still unidentified
Now playing
01:48
You heard her cry for her mom. See their reunion
CNN
Now playing
01:34
Trump official: Separations are saving lives
Emanuella Grinberg/CNN
Now playing
03:16
Watch daughter wait for separated mom's arrival
U.S. Border Patrol agents take a father and son from Honduras into custody near the U.S.-Mexico border on June 12, 2018 near Mission, Texas. The asylum seekers were then sent to a U.S. Customs and Border Protection (CBP) processing center for possible separation. U.S. border authorities are executing the Trump administration's zero tolerance policy towards undocumented immigrants. U.S. Attorney General Jeff Sessions also said that domestic and gang violence in immigrants' country of origin would no longer qualify them for political-asylum status. John Moore/Getty Images
John Moore/Getty Images
U.S. Border Patrol agents take a father and son from Honduras into custody near the U.S.-Mexico border on June 12, 2018 near Mission, Texas. The asylum seekers were then sent to a U.S. Customs and Border Protection (CBP) processing center for possible separation. U.S. border authorities are executing the Trump administration's zero tolerance policy towards undocumented immigrants. U.S. Attorney General Jeff Sessions also said that domestic and gang violence in immigrants' country of origin would no longer qualify them for political-asylum status. John Moore/Getty Images
Now playing
00:57
Most toddlers still separated from families
Young migrant children, whose faces can not be shown, are seen at the US Customs and Border Protection Facility in Tucson, Arizona during a visit by US First Lady Melania Trump, June 28, 2018. (Photo by MANDEL NGAN / AFP)        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
MANDEL NGAN/AFP/AFP/Getty Images
Young migrant children, whose faces can not be shown, are seen at the US Customs and Border Protection Facility in Tucson, Arizona during a visit by US First Lady Melania Trump, June 28, 2018. (Photo by MANDEL NGAN / AFP) (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
01:44
Only 54 children to be reunited by deadline
BROWNSVILLE, TX - JUNE 22:  A crying  Honduran woman and her child wait along the border bridge after being denied into the Texas city of Brownsville which has become dependent on the daily crossing into and out of Mexico on June 22, 2018 in Brownsville, Texas. Immigration has once again been put in the spotlight as Democrats and Republicans spar over the detention of children and families seeking asylum at the border. Before President Donald Trump signed an executive order Wednesday that halts the practice of separating families who were seeking asylum, over 2,300 immigrant children had been separated from their parents in the  zero-tolerance policy for border crossers.  (Photo by Spencer Platt/Getty Images)
Spencer Platt/Getty Images North America/Getty Images
BROWNSVILLE, TX - JUNE 22: A crying Honduran woman and her child wait along the border bridge after being denied into the Texas city of Brownsville which has become dependent on the daily crossing into and out of Mexico on June 22, 2018 in Brownsville, Texas. Immigration has once again been put in the spotlight as Democrats and Republicans spar over the detention of children and families seeking asylum at the border. Before President Donald Trump signed an executive order Wednesday that halts the practice of separating families who were seeking asylum, over 2,300 immigrant children had been separated from their parents in the zero-tolerance policy for border crossers. (Photo by Spencer Platt/Getty Images)
Now playing
02:41
Hear emotional phone calls from parents separated from their kids
mother daughter reunion
mother daughter reunion
Now playing
02:12
Watch a mother and child reunite after 55 days
BROWNSVILLE, TX - JUNE 22:  A crying  Honduran woman and her child wait along the border bridge after being denied into the Texas city of Brownsville which has become dependent on the daily crossing into and out of Mexico on June 22, 2018 in Brownsville, Texas. Immigration has once again been put in the spotlight as Democrats and Republicans spar over the detention of children and families seeking asylum at the border. Before President Donald Trump signed an executive order Wednesday that halts the practice of separating families who were seeking asylum, over 2,300 immigrant children had been separated from their parents in the  zero-tolerance policy for border crossers.  (Photo by Spencer Platt/Getty Images)
Spencer Platt/Getty Images North America/Getty Images
BROWNSVILLE, TX - JUNE 22: A crying Honduran woman and her child wait along the border bridge after being denied into the Texas city of Brownsville which has become dependent on the daily crossing into and out of Mexico on June 22, 2018 in Brownsville, Texas. Immigration has once again been put in the spotlight as Democrats and Republicans spar over the detention of children and families seeking asylum at the border. Before President Donald Trump signed an executive order Wednesday that halts the practice of separating families who were seeking asylum, over 2,300 immigrant children had been separated from their parents in the zero-tolerance policy for border crossers. (Photo by Spencer Platt/Getty Images)
Now playing
02:02
HHS won't give exact number of kids in custody
CNN
Now playing
02:13
Berman: DNA test is de facto admission of no plan
CNN
Now playing
02:39
Doctor describes trauma of migrant children
CNN
Now playing
00:52
Mother reunited with her son after 32 days
CNN
Now playing
01:45
Immigration attorney represented 3-year-old
(CNN) —  

President Donald Trump on Wednesday reversed course after days of digging in on a policy that resulted in immigrant family separations at the border, signing an executive order that will keep far more families together at the border.

The order also seeks more authority to detain those families together until the end of their immigration proceedings. That process will begin immediately, which is likely to be met with swift legal challenges, though the order does acknowledge that current law may restrict their hands.

But there are no new special procedures for children already in custody, according to the Department of Health and Human Services.

It’s a reversal from days of claiming that, in its decision to refer all adults crossing the border illegally for criminal charges and thus sending them away from their kids and into the hands of the Justice Department, the administration had no choice but to separate families.

Here is what the executive order does:

Keeps families together, for the most part

The executive order states it is the policy of the administration “to maintain family unity,” a new position from the administration which had been defending the separation of families and blaming the families themselves for putting themselves in the position of being separated by crossing the border illegally – saying the administration’s hands were tied.

While the Justice Department will continue to prosecute adults who cross the border illegally in federal court, the order says, Trump asks that families be housed together “where appropriate and consistent with law and available resources.”

It was not immediately clear whether the caveats would still result in a substantial number of separations.

Keeps families with DHS

In a major change, adults will not be turned over to the Justice Department when they face criminal charges, and will instead stay with their children in detention with the Department of Homeland Security.

That’s a change the administration previously said it could not do.

The order maintains an exception for when the child is at risk or there is concern about the child’s well-being.

But there’s a catch, saying the families will be detained “extent permitted by law and subject to the availability of appropriations” – again something that remains to be worked out.

Doesn’t reunite families already separated

The order does not speak to any families that have already been separated – and existing policies place the onus on parents to find their children in HHS custody and seek to reunite with them.

On Wednesday afternoon, HHS spokesman Kenneth Wolfe said, “For the minors currently in the unaccompanied alien children program, the sponsorship process will proceed as usual.”

Later Wednesday, HHS’ families division’s senior director of communications put out a statement that Wolfe “misspoke,” but didn’t articulate any changes yet to plans for separated families.

“It is still very early and we are awaiting further guidance on the matter,” Brian Marriott said. “Our focus is on continuing to provide quality services and care to the minors in HHS/ORR funded facilities and reunifying minors with a relative or appropriate sponsor as we have done since HHS inherited the program. Reunification is always the ultimate goal of those entrusted with the care of UACs, and the administration is working towards that for those UACs currently in HHS custody.”

When will their cases be heard in court?

In the executive order, Trump makes an effort to have families’ cases decided faster in immigration courts.

Until now, if a family had a potentially valid claim of asylum, it could wait months or years for an immigration court hearing, during which time they could live and work in the United States.

To expedite the process for deporting a family or granting its members legal status, Trump ordered the Justice Department to “prioritize” cases “involving detained families” – presumably allowing them to jump the immigration court line.

Seeks indefinite detention

Though the order does not immediately attempt to flout a court settlement that requires children who come with family to be released from detention within three weeks, it does initiate a process to challenge that settlement.

Trump ordered Attorney General Jeff Sessions to file a request in court to change the settlement in Flores v Reno – setting up a likely lengthy and intense litigation process that would seek the power to detain families in government custody indefinitely.

The settlement, however, is overseen by a judge and an appellate court that already imposed these conditions, making the court challenge an uphill climb for the Trump administration. The administration will have to seek the change from the judge who oversaw the settlement – over the objection of the previous administration – in the first place.

“This is narrower than I anticipated,” said Cornell Law professor Stephen Yale-Loehr. “Politically, this allows the administration to assert that it wants to detain families indefinitely – but a court won’t let them do it.”

In a call with reporters, Gene Hamilton, counselor to the Attorney General, seemed to acknowledge that the administration will need to convince the judge in the Flores case, Judge Dolly Gee, to reverse the previous settlement – even as he criticized her for making it in the first place.

“The result of this decision and this ruling has placed the executive branch in an untenable position. Do we catch and release every alien who comes with a child across our southwest border, or do we release (them)?” Hamilton said. “It’s on the judge, it’s on Judge Gee to render a decision here. …The simple fact of the matter is Judge Gee has put the executive branch into an untenable position, that’s why we’re seeking for Congress to make a permanent fix.”

Sets up family detention at military facilities

The order also instructs federal agencies – especially the Defense Department – to begin to prepare facilities that could house the potentially thousands of families that will now be detained by the government.

There are currently far more beds for single adults in the government than for families, who require different conditions.

With a few thousand families apprehended crossing the border illegally on average each month, detaining all of them could rapidly tax government resources.

HHS has reviewed three Defense Department locations in Texas and will be examining one in Arkansas for potential use in the Unaccompanied Alien Children program, Lt. Col. Jamie Davis, a Pentagon spokesman said.

The military would have no responsibility for any of the HHS-led activities, defense officials say. Officials liken it to being a ‘landlord’ but not responsible for the management of the housing, security, food services or other activities.

Blames Congress

The order also blames Congress – specifically its failure to pass immigration legislation – for the separation of families in the first place, saying the administration had no choice, even as the administration reversed course.

“It is unfortunate that Congress’s failure to act and court orders have put the Administration in the position of separating alien families to effectively enforce the law,” the order states.

CNN’s Ariane de Vogue, Laura Jarrett and Barbara Starr contributed to this report.