Bipartisan negotiators in Washington are running out of time to reach a deal over Donald Trump’s demand for a border wall after talks stalled, raising the prospect of another government shutdown starting on Friday.

Leaders from both main parties sitting on a 17-strong negotiating panel must reach a deal over the disputed border security issue by Monday if there is to be time for Congress to pass legislation and Trump to sign it before the latest deadline of 15 February. Should they fail to reach agreement within hours, federal agencies, already exhausted after the 35-day shutdown that ended last month having affected 800,000 federal employees, will yet again start to close from Friday at midnight.

“The talks have stalled right now,” Richard Shelby, Republican chairman of the senate appropriations committee, told Fox News Sunday. “I’m hoping we can get off the dime later today or in the morning, because time’s ticking away, but we’ve got some problems.”

Shelby put the odds of a deal being reached against a second shutdown occurring at 50-50. “I’m not confident we’re going to get there. The next 24 hours are crucial,” he said.

As jitters mount that the government might soon be inflicted with a second partial shutdown so soon after the first, congressional negotiators were trying desperately to overcome two sticking points. The most divisive appeared to be Democratic demands that a cap be placed on the number of undocumented immigrants held in federal detention centers.

Democrats want to impose the limit as a way of reining in the detention and deportation activities of the federalImmigration and Customs Enforcement (Ice) agency, which has been enabled by Trump to take a more aggressive stance. “They are talking about cutting down on the number of [detention] beds which would force them to be released into the United States, it’s an open border policy … that’s not going to be supported by this administration,” said Mark Meadows, a Republican from North Carolina and chairman of the House Freedom Caucus.

Trump waded into the fray on Sunday morning with a tweet in which he said that “out of the blue, [Democrats] want a cap on convicted violent felons to be held in detention!”

The other potential sticking point is the big picture issue of whether compromise can be reached on funding for a border wall or barrier. Trump instigated the first shutdown, the longest in US history, after Democrats refused to give him $5.7bn for a wall, with the House speaker, Nancy Pelosi, vowing to award “not one penny” for a project she denounced as “immoral”.

Positions held by both main parties appeared to have softened, with negotiators reportedly coalescing around a compromise sum of about $2bn. That in turn raised another critical question: would Trump himself accept a funding amount that would be less than half his initial $5.7bn demand?

In his Sunday morning tweet, Trump accused the Democrats of “offering very little money for the desperately needed Border Wall”. But there are signs that he would be prepared to sign a funding bill that would keep the government open while giving him substantially less than his desired amount.

Mick Mulvaney, the acting White House chief of staff, told NBC’s Meet the Press on Sunday that a shutdown was still “on the table”. But he indicated that if the negotiators settled on a compromise sum the president would swallow it.

“You cannot take a shutdown off the table, you cannot take 5.7 off the table, and if you end up somewhere in the middle you will probably see the president say ‘OK’ and then go and find the rest of the money another way,” Mulvaney said.

He added that there were “pots of money” that Trump could dip into through his legal powers. Some of those funds, however, would only be open to him were he to declare a national emergency – an idea he continues to flirt with even though it would be highly contentious both for Democrats and increasingly for his own party.

Following a by-now familiar gameplan, Trump will take his case for a wall to his own people on Monday when he flies to El Paso, Texas, on the border with Mexico to address a rally of supporters. The event promises to be a feisty encounter – a protest march will pass nearby that will be joined by Beto O’Rourke, the El Paso resident who came close to winning back a US Senate seat from Texas for the Democrats in the November midterm elections.