WASHINGTON — Congressional leaders struggled Friday to find a path forward on legislation to protect hundreds of thousands of “Dreamers” after the Senate’s efforts collapsed into a partisan morass. Immigrant rights advocates, losing faith in the legislative process, nervously turned their attention to the courts.

On Capitol Hill, both Democrats and Republicans said the future of the Dreamers — young immigrants who were brought into the country illegally as children — may not be settled anytime soon. With Congress gone for a weeklong recess, there is no immediate opportunity for lawmakers to regroup after Thursday’s defeat of three Senate bills, including one backed by President Donald Trump.

Other WRAL Top Stories

In the House, Republican leaders are trying to corral support for legislation that takes an even harder line than a White House-backed bill in the Senate, which got only 39 votes Thursday. But the House measure does not yet have enough support to pass, and even if it does, it will almost certainly be dead on arrival in the Senate.

In the Senate, some lawmakers — including John Cornyn of Texas, the No. 2 Republican — have raised the possibility of pairing a simple provision protecting the Dreamers from deportation with funding for the president’s proposed wall at the southern border with Mexico, and slipping that package into a large spending bill that must pass in late March.

“The clock is still ticking,” Cornyn said. “We kind of had test votes here. We kind of know what the tolerance is for different ideas.”

Meanwhile, a March 5 deadline looms. That is the day that the Obama-era Deferred Action for Childhood Arrivals program, or DACA, is set to expire. The program protects about 690,000 Dreamers from deportation and allows them to work, study or join the military. But Trump rescinded DACA, leaving it to Congress to find a replacement.

“I don’t know what the way forward is,” said Sen. Jeff Flake, R-Ariz., who has for years advocated an overhaul of immigration laws.

The uncertain outlook in Congress is matched by uncertainty in the courts. Two federal courts have blocked the Trump administration from ending DACA, but the Trump administration is seeking to have those court rulings overturned. On Friday, the Supreme Court convened a closed-door conference to consider whether to bypass appellate courts and take up the issue immediately.

If that happens, legal experts say, the administration will almost certainly prevail.

“Let’s not kid ourselves, it’s looking increasingly grim,” said Frank Sharry, executive director of America’s Voice, an immigrant rights group.

For his part Friday, Trump continued to blame Democrats for the morass, although 14 Republicans voted against his plan Thursday. Immigration has long been one of the most intractable issues in Washington. The Senate Republican leader, Mitch McConnell of Kentucky, had set aside this week for what was supposed to have been a freewheeling debate that would allow senators to build a bipartisan immigration bill from scratch.

Instead, the debate devolved into the usual partisan bickering. The White House worked aggressively to defeat a measure backed by the Common Sense Coalition, a bipartisan group of centrists. Their measure would have offered the Dreamers a path to citizenship, while committing $25 billion for border security, including the president’s proposed wall, over a 10-year period. It fell six votes short of the 60 needed to advance in the Senate.

“We still have time,” said Sen. Joe Manchin III, D-W.Va., a chairman of the coalition. “I think that the people are totally committed to it are going to want to get back together.”

But even if the group does get back together, it will almost certainly run into trouble coming up with an immigration plan that will meet Trump’s conditions. The president wants to severely limit family-based migration and cancel the diversity visa lottery, which aims to bring in immigrants from underrepresented countries.

Republicans and Democrats agree that there is now a very slim chance that legislation will pass offering citizenship to the Dreamers. With the Senate debate over, the White House is throwing its weight behind the House measure, which proposes a more far-reaching rewrite of immigration laws than even the president considered.

The House bill would require employers to use an Internet-based system, known as E-Verify, to confirm that they are hiring only legal workers; crack down on sanctuary cities by denying them federal grants; allow for the detention of minors who are arrested at the border with their parents; and toughen sentences for criminals who have been deported and return illegally.

The measure would end the diversity visa lottery program, as Trump wants, and end family-based migration for all relatives other than spouses and minor children. It would offer three-year renewable work permits to DACA recipients, without offering them a path to citizenship.

In the Senate, Flake is trying to gather support for a measure that would simply extend DACA by three years, without offering a path to citizenship, in exchange for three years of border-wall funding. Such a bill could be attached to the spending measure that must pass by March 23, when funding for the government runs out.

Democrats might not agree to wall funding without a path to citizenship for the Dreamers. And even Flake did not sound enthusiastic about that prospect.

“This is a failure of Congress to act responsibly here,” he said. “I don’t know how else to say it. To fall back to just basically codifying a program that doesn’t give certainty moving ahead, this is not a win.”

The negotiations over the spending bill, which would keep the government open until the Sept. 30 end of the fiscal year, will play out in the next few weeks. But a continued impasse over immigration could again raise the threat of yet another government shutdown, on top of the two brief closures that have occurred this year. Once again, Democratic votes will be needed to pass the spending bill, since 60 votes are required in the Senate, where Republicans hold 51 seats, and numerous fiscally conservative Republicans are very likely to vote against it in the House.

Lawmakers were on a collision course over immigration as part of the negotiations of a long-term spending bill. Both the House and Senate plans for funding the Department of Homeland Security for the current fiscal year would provide $1.6 billion for physical barriers along the southern border with Mexico.

The wall funding is a probable flash point between the two parties, as Democrats are loath to grant Trump his wish of building it.

If Congress were to approve a spending bill without wall funding, Trump could veto it. The president has shown an appetite for such a confrontation, saying this month that he would “love to see a shutdown” if his demands on immigration are not met.