President Trump on Sunday explicitly advocated for depriving undocumented immigrants of their due-process rights, arguing that people who cross the border into the United States illegally are invaders and must immediately be deported without trial or an appearance before a judge.

Trump’s attack on the judicial system sowed more confusion as lawmakers struggle to reach consensus on immigration legislation and as federal agencies scramble to reunite thousands of migrant children and their parents who were separated at the border under an administration policy that the president abruptly reversed last week.

The House is preparing to vote this week on a broad Republican immigration bill. Although the White House supports the proposed legislation, its prospects for passage appeared dim Sunday, both because Democrats oppose the measure and because Republicans have long been divided over how restrictive immigration laws should be.

Meanwhile, some GOP lawmakers were preparing a more narrow bill that would solely address one of the flaws in Trump’s executive order, which mandates that migrant children and parents not be separated during their detention. The 1997 “Flores settlement” requires that children be released after 20 days, but the GOP proposal would allow for children and their parents to stay together in detention facilities past 20 days.

At the center of the negotiations is a president who has kept up his hard-line rhetoric even as he gives contradictory directives to Republican allies. In a pair of tweets sent late Sunday morning during his drive from the White House to his Virginia golf course, Trump described immigrants as invaders, called U.S. immigration laws “a mockery” and wrote that they must be changed to take away legal rights from undocumented migrants.

“We cannot allow all of these people to invade our Country,” Trump wrote. “When somebody comes in, we must immediately, with no Judges or Court Cases, bring them back from where they came. Our system is a mockery to good immigration policy and Law and Order. Most children come without parents.”

The president continued in a second tweet: “Our Immigration policy, laughed at all over the world, is very unfair to all of those people who have gone through the system legally and are waiting on line for years! Immigration must be based on merit — we need people who will help to Make America Great Again!”

Trump also exhorted congressional Democrats to “fix the laws,” arguing that “we need strength and security at the Border! Cannot accept all of the people trying to break into our Country.”

After House Republicans failed to pass a hard-line immigration bill last week, they were preparing to vote on another broad bill this week that would provide $25 billion for Trump’s long-sought border wall, limit legal immigration and give young undocumented immigrants a path to citizenship.

“I did talk to the White House yesterday. They say the president is still 100 percent behind us,” Rep. Michael McCaul (R-Tex.), a co-sponsor of the bill, said on “Fox News Sunday.”

But because that bill may not garner enough votes to pass the House, momentum was building over the weekend for a more narrow measure that would effectively end the Flores settlement. Should the broader bill fail, the White House is preparing to throw its support behind the measure, which is expected to garner wider support among lawmakers, according to a White House official.

Legislative negotiations are continuing behind the scenes despite Trump’s vacillations over the past week. The president began the week defending his administration’s family separation policy. On Tuesday night, he expressed support for two rival GOP bills in a muddled and meandering address to House Republicans in which he insulted Rep. Mark Sanford (R-S.C.) without prompting, drawing a smattering of boos. Then on Friday, he urged lawmakers to throw in the towel, tweeting, “Republicans should stop wasting their time on Immigration until after we…