Visitors look up at the domed ceiling while on a tour of the Rotunda at the U.S. Capitol in Washington

Visitors from the Sarasota Military Academy in Sarasota, Fla.., look up at the domed ceiling while on a tour of the Rotunda at the U.S. Capitol Feb. 6.

WASHINGTON — The nation faces the real possibility of another government shutdown at the end of the week, after bipartisan talks aimed at averting that outcome broke down in a dispute over immigration enforcement, lawmakers and aides said Sunday.

President Donald Trump’s border wall demands, which precipitated the record-long 35-day shutdown that ended late last month, were a secondary issue in the impasse that developed over the weekend, according to officials in both parties.

Instead, after looking promising for days, the delicate negotiations collapsed over Democrats’ insistence on limiting the number of unauthorized immigrants who can be detained by the U.S. Immigration and Customs Enforcement agency. The breakdown in talks made it unlikely that lawmakers will be able to finalize an agreement on Monday, as they’d hope to do so it could pass the House and Senate before Friday’s deadline.

“I think the talks are stalled right now,” Senate Appropriations Chairman Richard Shelby of Alabama, the lead Republican negotiator, said on Fox News Sunday. “I’m not confident we’re going to get there.”

The stalemate left the path forward to keeping the government open unclear.

There were some behind-the-scenes efforts to salvage the talks Sunday evening, but it was uncertain whether they would be successful.

The Homeland Security Department along with State, Agriculture, Commerce and a number of other federal agencies are currently operating on a stopgap spending bill that Trump signed Jan. 25. There’s little appetite for another short-term funding extension, but without some action by midnight on Feb. 15, those agencies will run out of money and begin to shut down. Another funding lapse could affect many Americans within days, because one of the agencies that would go unfunded during the shutdown is the IRS, which is processing tax returns for millions of people. During the 35-day shutdown that began in late December, thousands of IRS officials refused to show up for work without pay, backlogging the tax filing process.

The President, who is scheduled to hold a rally in El Paso, Texas, on Monday that’s likely to focus on his demands for more border security, referenced the disagreement in a tweet on Sunday.

“I don’t think the Dems on the Border Committee are being allowed by their leaders to make a deal. They are offering very little money ...’ for the wall, Trump said.