President Donald Trump on Wednesday signed an executive order ending his administration's practice of separating migrant families, but maintaining the "zero-tolerance" policy that criminally prosecutes migrants who cross the border illegally.

The Trump administration is now seeking to amend an existing decree known as the Flores settlement in an effort to allow families to be detained together indefinitely (currently children cannot be detained longer than 20 days).

The Trump administration separated more than 2,000 children from their parents since early May, garnering overwhelming backlash from the public.

It's unclear what will happen to the families that have already been separated.

President Donald Trump on Wednesday signed an executive order to keep families apprehended at the border together, weeks after implementing the "zero tolerance" policy that separated thousands of migrant children from their parents.

"It's about keeping families together while at the same time being sure that we have a very powerful, very strong border," Trump told reporters after signing the order in the Oval Office. "We are going to keep the families together. I didn't like the sight or the feeling of families being separated."

The reversal by Trump comes weeks into his administration's new policy to criminally prosecute all adult migrants who are caught crossing the border illegally; in such prosecutions, adults are separated from any children traveling with them.

The order also directs Attorney General Jeff Sessions to seek to modify a 1997 agreement known as the Flores settlement, which bars authorities from detaining immigrant children for longer than 20 days.

Under the order, the zero-tolerance policy will remain in effect. So if the Flores settlement is successfully amended, the families caught crossing the border illegally will be detained together.

"When an alien enters or attempts to enter the country anywhere else, that alien has committed at least the crime of improper entry and is subject to a fine or imprisonment," the order said, adding that the administration's new policy will be to "maintain family unity, including by detaining alien families together where appropriate and consistent with law and available resources."

The policy has so far separated more than 2,300 migrant children from their parents, in a chaotic process that places the children in shelters and with foster families across the country, while their parents remain detained.

Wednesday's order included the caveat that immigration authorities will not detain families together if "there is a concern that detention of an alien child with the child's alien parent would pose a risk to the child's welfare."

'They won't give us the votes'

In this photo provided by U.S. Customs and Border Protection, people who've been taken into custody related to cases of illegal entry into the United States, sit in one of the cages at a facility in McAllen, Texas, Sunday, June 17, 2018. Customs and Border Protection's Rio Grande Valley Sector via Associated Press Stories about devastated parents and traumatized children have spread throughout the national media for weeks, causing public outrage across the political spectrum.

Trump had tweeted earlier Wednesday that he was "working on something," once again blaming Democrats for refusing to support Republican legislation designed to keep families detained together after they're arrested at the border.

"It's the Democrats fault, they won't give us the votes needed to pass good immigration legislation," he tweeted. "They want open borders, which breeds horrible crime. Republicans want security. But I am working on something - it never ends!"

Trump has continually falsely blamed Democrats for laws he said required the separation of migrant families, though no law requires family separation and the zero-tolerance policy was implemented by his administration alone.

A growing chorus of critics — including some Republicans — have noted that the Trump administration implemented the policy unilaterally and could rescind it with the stroke of a pen.

But Trump and his allies have resisted, arguing that Trump cannot end family separations without first closing "loopholes" in immigration law that they say perpetuate illegal immigration. Those include the Flores settlement and other laws that prevent migrant children from being detained for extended periods after they're caught illegally crossing the border.

It's unclear what will happen to the families that have already been separated after Trump signs the order.

Are you are an immigrant who has been separated from your family at the border? Or do you work with families who have been detained or separated? Email mmark@businessinsider.com to share your story.

¿Es usted un inmigrante que ha sido separado de su familia en la frontera? ¿O trabajas con familias que han sido detenidas o separadas?Envíe un correo electrónico a mmark@businessinsider.com para compartir su historia.