Donald Trump’s order to stop separating migrant children from their parents has spread confusion along the border, with officials still working on a plan to reunite families while sending conflicting signals about the state of the “zero-tolerance” policy.

Immigration and Customs Enforcement said it is looking into creating 15,000 beds for use in detaining immigrant families. A day earlier, the Pentagon said it was drawing up plans to house as many as 20,000 migrants on US military bases.

Parents who remained locked up struggled to get in touch with children being held in many cases hundreds of miles away.

Some said they did not know where their children were, while others said they had been deported without them.

The president took a hard line on the crisis, accusing the Democrats of telling “phoney stories of sadness and grief”.

“We cannot allow our country to be overrun by illegal immigrants,” he tweeted.

A senior Trump administration official said about 500 of the more than 2,300 children taken from their families at the border in recent weeks have been reunited since May.

Federal agencies are working to set up a centralised reunification process for all remaining children at a detention centre on the Texas side of the border, said the official.

There were also signs that the administration is dialling back, for now, its “zero-tolerance” policy of prosecuting all adults caught crossing into the US illegally.

Immigrants are escorted back across the border by US Customs and Border Patrol agents (David J Phillip/AP)

The federal public defender’s office for the region that covers El Paso to San Antonio said federal prosecutors would be dismissing cases in which parents were charged with illegally entering the country and separated from their children.

In the Texas border city of McAllen, federal prosecutors unexpectedly did not pursue charges against 17 immigrants on Thursday. A prosecutor cited Mr Trump’s executive order ending the practice of separating families, but the Justice Department denied “zero tolerance” had been rolled back.

“There has been no change to the department’s zero-tolerance policy to prosecute adults who cross our border illegally instead of claiming asylum at any port of entry at the border,” spokeswoman Sara Isgur Flores said.

The uncertainty at the border resulted after Mr Trump abruptly reversed policy in the face of an international outcry over the separation of families. The president said he would instead keep children and parents together.

The reversal left a host of unanswered questions, including where the government will house newly detained migrants in an already overcrowded system, and how parents and children will be kept together.

The administration began drawing up plans to house as many as 20,000 migrants on US military bases, although officials gave conflicting explanations on whether those beds would be for children or for families.

The Justice Department also went to court in an attempt to overturn a decades-old settlement that limits to 20 days the amount of time migrant children can be locked up with their families.