Donald Trump has ordered federal authorities to begin reuniting children and parents who had been separated at the US-Mexico border – families torn apart by his government’s zero tolerance immigration policy.

A day after the president signed an executive order to halt the separation of families, something that had triggered international outrage, Mr Trump said officials had been tasked with reuniting the thousands of children taken from their parents.

Mr Trump’s announcement came as his wife, Melania, made a damage-control visit to a border detention facility in Texas, and Congress killed a hardline immigration reform bill as Republicans looked to try to unite their divided party on the issue.

Mr Trump has repeatedly blamed the Democrats for the issues on the border, saying they will not help change the laws that his administration is bound to follow. After his announcement at a cabinet meeting, Mr Trump tweeted: “My Administration is acting swiftly to address the illegal immigration crisis on the Southern Border. Loopholes in our immigration laws all supported by extremist open border Democrats.”

At a cabinet meeting, Mr Trump said: “My wife, our first lady, is down now at the border because it really bothered her to be looking at this and seeing it, as it bothered me, as it bothered everybody at this table. We’re all bothered by it.“

The claim that Mr Trump is only stymied by Democrats is false. Mr Trump has always had the power to stop his administration from enforcing the separations, which stems from a policy of prosecuting every adult who illegally crosses the US border. Children and family of adults prosecuted are taken into the care of the government while cases are processed. However, Congress will be required to push through broader immigration reform, with one of Mr Trump’s campaign policies being stronger border control laws.

Video footage of children sitting in cages, and an audiotape of wailing kids separated from their parents, had sparked anger as it was broadcast worldwide, and the first lady, Ms Trump, made a rare intervention on public policy at the weekend when she said she hated to “see children separated from their families”.

On Wednesday, as pressure mounted over the separations which have been happening since mid-April, Mr Trump signed an executive order halting the process, although that action could face possible legal challenges. The Washington Post claimed Mr Trump was also poised to tell the US Border Patrol to no longer refer migrant parents who cross into the United States illegally with children to federal courthouses. The Department of Justice denied there had been any change in its prosecution policy.

But amid the confusion it was clear the president had seen the harm being done by the non-stop media coverage of his controversial policy, introduced by attorney general Jeff Sessions in April. However, when asked whether his administration had abandoned its zero tolerance policy of prosecuting all adults caught illegally crossing the border, the president did not answer directly but showed no sign of softening.

“We have to be very, very strong on the border. If we don’t do it, you will be inundated with people and you really won’t have a country,” Mr Trump said.

There were reports on Thursday that the US Department of Health and Human Services had asked the Pentagon for space to house up to 20,000 children on military bases.

Meanwhile, during her unannounced visit to Texas, Ms Trump was welcomed by staff at the Upbring New Hope Children’s Centre, a facility that houses 58 unaccompanied migrant children.

The first lady met with the facility’s executive director, a case manager, a medical care coordinator and others as she began a tour of the facility. She was told the children there, most of whom are between the ages of 12 and 17, are usually ”distraught“ when they first enter. Their physical and mental states are immediately assessed, and they are given orientation.

“I’m here to learn about your facility,” Ms Trump said. “I also like to ask you how I can help to be sure these children reunite with their families as quickly as possible.“

Donald Trump blames Democrats for children being taken from families at Mexico border

Programme director Roy De La Cerda told the first lady that the mostly Guatemalan children typically stay at the centre for an average of 42 to 45 days. He said staff have “a tremendous passion for working with these children” and the centre is their home.

However, the trip was not without controversy. As she was boarding the plane to Texas, Ms Trump was pictured wearing an army green jacket adorned with bold, white letters on the back, reading: “I REALLY DON’T CARE, DO U?”

Ms Trump’s spokeswoman, Stephanie Grisham, responded with a statement to reporters saying: “It’s a jacket. There was no hidden message.”

“After today’s important visit to Texas, I hope the media isn’t going to choose to focus on her wardrobe,” Ms Grisham added.

Back in Washington, Republicans were scrambling to round up sufficient votes to pass legislation intended to end the policy of separating migrant children from their families.

On Capitol Hill, Republicans were trying to vote on two bills – the hardline measure and another “compromise”. Both would halt the practice of separating families entering the US illegally and address a range of other immigration issues.

But the party’s leadership admitted that with the Democrats refusing to back either measure, they were struggling to find sufficient votes.

“Well, we’re working with our members. Obviously we have to get 218 votes and we’re working hard to get there,” congresswoman Cathy McMorris Rodgers, head of the House Republican Conference, told Fox News. “We’re not there yet but we’re working on it.”

In the end, the House defeated the conservative bill 193-231 as a group of Republicans joined Democrats to sink the plan. A vote on the second bill has been pushed back until Friday, as Republican leadership looks to ensure enough support that has split the right wing and the centre of the party.

Jeff Sessions says US border control detention centers not comparable to Nazi concentration camps: 'Jews were trying to leave the country'

While Mr Trump had acted unilaterally to stem the family separations, legislators would prefer a legislative solution to the problem. The administration is not ending its zero tolerance approach to border prosecutions. If the new policy is rejected by the courts, which the administration acknowledges is a possibility, the debate could move back to square one.

Speaking before the cabinet meeting on Thursday, Mr Trump said: “I signed a very good executive order.”

In following through that order, the Department of Justice (DoJ) has asked a federal judge to modify a 1997 court settlement regarding the detention of immigrant children who enter the country illegally. The DoJ is seeking permission for the government to detain children for longer than the current limit of 20 days, in an effort to keep them with their parents.

Undocumented immigration across the US-Mexico border Show all 14 1 /14 Undocumented immigration across the US-Mexico border Undocumented immigration across the US-Mexico border Immigrant children, many of whom are separated form their parents, are housed in Texas' tent city Reuters Undocumented immigration across the US-Mexico border A two-year-old Honduran asylum seeker cries as her mother is searched and detained near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Undocumented migrants ride on the top of a freight train referred to as the beast, or La Bestia Getty Undocumented immigration across the US-Mexico border A cage inside a US Customs and Border Protection detention facility in Texas Reuters Undocumented immigration across the US-Mexico border US Border Patrol Academy All new agents must complete a months-long training course at the New Mexico facility before assuming their posts at Border Patrol stations, mostly along the US-Mexico border Getty Undocumented immigration across the US-Mexico border US-Mexico border fence A group of young men walk along the Mexican side of the US-Mexico border fence in a remote area of the Sonoran Desert Getty Undocumented immigration across the US-Mexico border US-Mexico border fence in the US Man looks through US-Mexico border fence into the US in Tijuana, Mexico Getty Undocumented immigration across the US-Mexico border US-Mexico border fence US Border Patrol agent Sal De Leon stands near a section of the US-Mexico border fence while stopping on patrol on in La Joya, Texas Getty Undocumented immigration across the US-Mexico border US Border Patrol Academy US Border Patrol instructor yells at trainees after their initial arrival to the academy Getty Undocumented immigration across the US-Mexico border Memorial service in Guatemala Families attend a memorial service for two boys who were kidnapped and killed in San Juan Sacatepequez, Guatemala. Crime drives emigration from Guatemala to the United States, as families seek refuge from the danger Getty Undocumented immigration across the US-Mexico border Arrests on the border Undocumented immigrants comfort each other after being caught by Border Patrol agents near the US-Mexico border Getty Undocumented immigration across the US-Mexico border Detention holding facility A boy from Honduras watches a movie at a detention facility run by the US Border Patrol Getty Undocumented immigration across the US-Mexico border Mexican farm workers Mexican migrant workers harvest organic parsley at Grant Family Farms in Wellington, Colorado Getty Undocumented immigration across the US-Mexico border Mexican family in Arizona A Mexican immigrant family sits in the living room of their rented home in Tuscon, Arizona. The family that Arizona's new tough immigrant law had created a climate of fear in the immigrant community. Getty

Yet Mr Trump said the “only real solution” was for Congress to close loopholes in the immigration system, adding: “If we don’t close these loopholes there is no amount of money or personnel in the world.”

The senior Democrat in the Senate, Chuck Schumer, said that he wants to know how many children are already being held, after illegally crossing the US-Mexico border, and in what conditions.

The New York senator also wondered how the Trump administration was keeping track of families separated under its zero tolerance policy on illegal border crossings.

Activists had pointed out that Mr Trump’s executive order did nothing to address the plight of the more than 2,300 children who have already been separated from their parents under the president’s policy, seemingly leading to his remarks about reunification on Thursday.

“Trump has shown he has zero tolerance for migrants, zero tolerance for minors seeking to be reunited with their families,” Yanira Arias, national campaigns manager of the activist group Alianza Americas, told The Independent.

She said Mr Trump appeared to have no interest in the fact that children and their parents – many of them from Guatemala, El Salvador and Honduras – were simply seeking a better life.