MCALLEN - Melania Trump made a surprise trip to the US-Mexican border on Thursday, visiting a migrant children’s shelter as her husband’s administration seeks to quell a firestorm over family separations.

The unannounced visit by the first lady, who was also to travel to a border patrol processing center, came a day after President Donald Trump - in a stunning about-face - moved to end the practice of splitting immigrant families. The first lady landed in McAllen, Texas under a heavy downpour, her motorcade driving through deep water to the Upbring New Hope Children’s Shelter, a federally-funded facility that houses around 60 children from Honduras and El Salvador, ages five to 17.

“I’m glad I’m here and I’m looking forward to seeing the children,” Melania Trump said at a roundtable discussion with social workers and government officials.

“I would also like to ask you how I can help these children to reunite with their families as quickly as possible.”

Images and recordings of wailing children detained in cage-like enclosures has ignited global outrage, and Melania Trump herself had called for a political compromise to end the separations - the result of the administration’s “zero tolerance” policy towards illegal border crossers enforced since early May.

The surprise trip “was 100 percent her idea,” Melania Trump’s spokeswoman Stephanie Grisham told reporters travelling with her to Texas. “She wanted to see everything for herself.”

Despite Trump’s executive order on ending family separations, there was no immediate plan in place to reunite the more than 2,300 children already separated from their families. In addition, Trump’s order would keep families together but in custody indefinitely while parents are prosecuted for entering the country illegally - a move that could lead to new legal battles for the administration. “The executive order certainly is helping pave the way a little bit, but there’s still a lot to be done,” Grisham acknowledged.

Melania Trump’s visit also came barely an hour before divided US lawmakers were to begin voting on a pair of immigration bills in the House of Representatives, including one that directly addresses the family separation issue.

But Republicans were divided over the two measures, and Democrats signalled their opposition, making for a day of legislative drama. “Congress has the authority and the responsibility to make the law of the land and to fix the immigration system,” Homeland Security Secretary Kirstjen Nielsen told a security forum on Capitol Hill. “We need Congress to act.”

Two measures are before the House of Representatives - a conservative bill and a more moderate “compromise,” which the White House and leadership in the Republican-controlled Congress has been urging rank-and-file members to support.

Top House Democrat Nancy Pelosi said her caucus was opposed to both bills, and it was unclear if there was sufficient Republican support for the compromise measure. In addition to ending family separations, the compromise addresses Trump’s goals of boosting border security including funding for his wall, limiting so-called “chain migration,” ending the visa lottery program and providing legal protections for so-called Dreamer immigrants who were brought to the country illegally as children.

Trump has accused rival Democrats of causing the crisis at the border through inaction on illegal immigration - charging that his opponents put “illegal immigrants before they put American citizens.”

For weeks, Trump had insisted he was bound by law to split children from their parents and that only Congress could resolve the problem - before he radically shifted gears. Trump’s executive order suggests the government intends to hold the families indefinitely by challenging a 1997 court ruling known as the Flores Settlement, which places a 20-day limit on how long children, alone or with their parents, can be detained.

Trump said there was a need to sustain his “zero tolerance” policy to prevent crime. “We still have to maintain toughness, or our country will be overrun by people, by crime, by all of the things that we don’t stand for and we don’t want,” he said. After a downturn last year, the flow of migrants from Central America and Mexico has surged since October.

From March to May this year, more than 50,000 people a month were apprehended for illegally crossing the border from Mexico.

Nearly all of the arriving families, and many others, have officially requested asylum, citing the high levels of violence in their home countries.

The “zero tolerance” policy, under which illegal border crossers were systematically prosecuted and their children separated from them as a result, was announced May 7.

Justice Department officials have characterized the executive order as a “stopgap” move, saying Congress needs to pass new legislation to give the president more powers to fight illegal immigration.