Time is running out to avoid a second partial government shutdown, as congressional talks about border-security funding broke down during the weekend in the latest dispute over detention beds for immigrants.

Negotiations could still get back on track in the next 24 hours, and negotiators may decide that a stopgap funding extension past Friday is necessary. But the prospect of getting an agreement by Friday’s deadline seems to have derailed, just as negotiators had hoped to unveil a deal Monday to set up votes in the House and Senate this week.

The sticking point is over the number and purpose of immigration detention beds. Democrats are seeking a cap to force U.S. Immigration and Customs Enforcement, or ICE, to detain criminals rather than undocumented immigrants with no criminal history. Republicans are resisting a limit on grounds that criminals shouldn’t count toward it and ICE should have discretion.

Without a funding deal, nine federal departments and related agencies would shut down again, just weeks after a record 35-day closing. Negotiators also continue to haggle about the amount of funding for a wall and placement of fencing on the southern U.S. border. Amid the talks, Trump heads to El Paso, Texas, on Monday for a rally “to show Democrats how much Americans demand The WALL,’’ according to a Trump campaign fundraising email on Sunday.

Even Chances

“I’ll say 50/50 we’ll get a deal,” Senate Appropriations Chairman Richard Shelby said on “Fox News Sunday.” “I hope and pray we do.”

Lawmakers could resort to a resolution with funding through Sept. 30 if they can’t get a deal, but acting White House Chief of Staff Mick Mulvaney said on “Fox News Sunday” that Trump “cannot sign everything they put in front of him. There’ll be some things that simply we couldn’t agree to.”

Mulvaney said a shutdown isn’t the most likely option but that he “absolutely cannot” rule it out. Trump has also threatened declaring a national emergency to get funding for a border wall.

“He’s going to do whatever he legally can to secure the border,” Mulvaney said on NBC’s “Meet the Press,” one of two appearances on Sunday talk shows.

Democrats are also demanding language in the bill aimed at blocking Trump from shifting funds to pay for the wall, according to a person familiar with the negotiations. The language could stymie executive actions to build the barriers and has become another hitch in the negotiations, the person said.

Barrier Money

As of Saturday, it seemed that negotiators were focused on a proposal with border barrier funding of between US$1.3 billion and US$2 billion, said a person familiar with the talks. Details about where the fencing would go and a Democratic request to eliminate previously funded fencing in the National Butterfly Center, a conservation area close to the border in Mission, Texas, were still being negotiated.

The White House and Republicans have been emphasizing in the talks that Trump cannot accept less than US$2 billion for border barriers. As Democrats consider increasing the funding for barriers, they have also more demands for restrictions on where it can be placed and have kept a demand for a cap on detention beds -- something Republicans are resisting.

Detention Beds

There are currently 40,520 ICE immigration detention beds funded by Congress. Heading into the talks, the White House sought to increase the number to 52,000, while Democrats wanted a reduction to 35,520. Democrats have proposed a 16,500 cap on beds to be used for interior enforcement, with the rest to be used for those captured at the border, according to people familiar with the talks.

A senior Republican aide said Shelby won’t accept an interior cap, and Democrats told Republicans they won’t proceed without one.

Democrats proposed the cap at the beginning of the negotiations, but Republicans were surprised and dismayed that the proposal remained in the latest Democratic offer on Saturday. The initial offer, which had no money for border barriers, was seen a low-ball opening bid.

House Speaker Nancy Pelosi has resisted calls from a small but vocal liberal wing of her caucus including Representative Alexandria Ocasio-Cortez to dismantle ICE. Even so, the inclusion of the proposal to limit the ability of ICE to detain undocumented immigrants reflects pressure from the progressives.

Restricting ICE

Democrats said they want to use the cap -- which matches an informal one used during the Obama administration -- to force ICE to detain criminals rather than undocumented immigrants with no criminal history, including people who’ve overstayed their visas.

“For far too long, the Trump administration has been tearing communities apart with its cruel immigration policies,” said Democratic Representative Lucille Roybal-Allard of California, a member of the conference committee.

“A cap on ICE detention beds will force the Trump administration to prioritize deportation for criminals and people who pose real security threats, not law-abiding immigrants who are contributing to our country.”

But Republicans are pushing back that Democrats are seeking to limit the number of beds available for violent criminals.

“That would incentivize illegal immigration and undercut anything you did on the wall,” Republican Senator Lindsey Graham of South Carolina said on Fox News’s “Sunday Morning Futures.”

Trump entered the fray on Sunday saying on Twitter he doesn’t think Democrats on the committee are being allowed by their party leaders to make a deal with border wall money and “now, out of the blue, want a cap on convicted violent felons to be held in detention!”

“I actually believe they want a Shutdown,” Trump said in a separate tweet, suggesting it was a bad week for Democrats with the controversy in Virginia and good economic news for the U.S. economy, and they want to change the subject.

Trump also seized on a Feb. 8 Gallup blog posting about a survey of Latin America countries that estimated 42 million of its residents want to come to the U.S.

“Gallup Poll: ‘Open Borders will potentially attract 42 million Latin Americans,’” Trump tweeted on Sunday. “This would be a disaster for the U.S. We need the Wall now!”