President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE on Wednesday said he will sign an “executive order” intended to end his administration's controversial practice of separating children from their parents who illegally cross the southern border.

“We want to keep families together. It’s very important. I’ll be signing something in a little while that’s going to do that,” Trump told reporters during a meeting with Republican lawmakers at the White House.

Details about the order remain unknown, but Trump said he would be signing the document before leaving for a Wednesday night campaign rally in Duluth, Minn.

ADVERTISEMENT

The move would be a major reversal for Trump and comes after the president and his top aides insisted for days that only Congress could halt family separations at the border, despite members of both parties saying Trump could unilaterally change the policy.

Trump said during a speech on Tuesday that congressional action is the “only solution to the border crisis.”

“Congress and the courts created this problem, and Congress alone can fix it,” Homeland Security Secretary Kirstjen Nielsen Kirstjen Michele NielsenMore than million in DHS contracts awarded to firm of acting secretary's wife: report DHS IG won't investigate after watchdog said Wolf, Cuccinelli appointments violated law Appeals court sides with Trump over drawdown of immigrant protections MORE said on Monday.

But fierce criticism of the president’s family separation policy has continued to build nationally and even globally, with Pope Francis calling it “contrary to our Catholic values” and “immoral.”

Republicans and Democrats in Congress have been scrambling to draft legislation aimed at keeping families together, even as they urged the president to change his administration’s policy on his own.

“President Trump could stop this policy with a phone call,” Sen. Lindsey Graham Lindsey Olin GrahamSenate GOP aims to confirm Trump court pick by Oct. 29: report The Hill's Campaign Report: GOP set to ask SCOTUS to limit mail-in voting Senate GOP sees early Supreme Court vote as political booster shot MORE (R-S.C.) said on CNN last Friday. “If you don’t like families being separated, you can tell DHS, ‘stop doing it.’”

Trump said Wednesday he wanted to push lawmakers to adopt more restrictive immigration policies, such as border-wall funding and cuts to legal immigration, but complained Democrats would not agree.

“We’re having a lot of problems with Democrats,” he said. “They don’t want to vote for anything. They don’t care about lack of security. They really would like to have open borders where anybody in the world can just flow in, including from the Middle East.”

House GOP leaders, who were struggling to secure the votes for a compromise immigration bill that addresses the family-separation issue, kicked their whip operation into high-gear as they worked to sell wavering members on the plan.

Trump spoke shortly after Nielsen arrived at the White House amid reports the administration was weighing an executive order to end the practice of separating families.

The order reportedly being drafted by Nielsen would direct the Department of Homeland Security (DHS) to keep families together in detention while they await hearings before immigration judges.

The White House also signaled earlier Wednesday that Trump is open to signing a narrow piece of legislation that would end the family separations. But it’s not clear if Congress has the votes to pass any piece of legislation, a dynamic that caused the president to act.

“There was hope that one of the immigration bills in the House would move and solve the current issue but due to the urgency of the situation, it was determined an [executive] action was warranted,” said a White House official who requested anonymity to explain internal thinking.

The plans, however, remain fluid and it is unclear the directive he plans to sign is the one drafted by Nielsen or a different document.

Since the Trump administration in April announced its “zero-tolerance” policy on illegal immigration, DHS says roughly 2,000 children have been separated from their adult guardians and placed in detention centers while the adults await prosecution for illegally crossing the border.

News reports have been dominated by images of children being kept in cages inside the facilities near the border and an audio recording emerged on Monday of young kids crying and asking for their parents.

The near-constant coverage has generated more outrage and pressure on the president to change course.

Trump earlier Wednesday hinted at pending action, tweeting, “I am working on something - it never ends!”

Lawmakers from both parties have spoken out against family separation, calling it “cruel” and “inhumane.” Some Democrats have called for Nielsen to resign for enforcing the policy.

Members of both parties have crafted legislation aimed specifically at ending family separation at the border, though it’s unclear if any measure garner enough support to pass through Congress.

The House on Thursday is expected to vote on two other immigration bills. The president met with House Republicans late Tuesday and told them he would sign either measure.

Trump appeared to surprise lawmakers when he said he would postpone a picnic for them and their families at the White House scheduled for Thursday while they sort out the immigration issue.

“We want to see if we can solve it, so we’re cancelling or postponing the congressional picnic tomorrow,” Trump said.

As the announcement was made, White House cooks were preparing steaks on large grills just outside the West Wing.

The president on Tuesday night spoke at a fundraiser for the pro-Trump super PAC America First Action. Donors paid at least $100,000 to attend the event at the Trump International Hotel in Washington.

– Brett Samuels, Melanie Zanona and Niall Stanage contributed to this report, which was updated at 1:31 p.m.