Democrats and the White House said late Thursday they had struck an agreement intended to avert a partial government shutdown, but the deal’s passage was delayed as leaders scrambled to secure enough votes before a midnight Friday deadline. The agreement would temporarily fund the U.S. Department of Homeland Security even as Democrats and the White House continued negotiations over possible new restrictions tied to President Donald Trump’s immigration enforcement push.

The White House and Senate Democrats separated homeland security funding from a larger spending measure, according to the report. The Homeland Security department would receive funding for two weeks while lawmakers consider Democratic demands aimed at Immigration and Customs Enforcement, including limits on enforcement activities and tighter warrant rules.

In a social media post Thursday evening, Trump said Republicans and Democrats “have come together to get the vast majority of the government funded until September” while also extending current Homeland Security funding. He urged members of both parties to cast what he called a “much needed Bipartisan ‘YES’ vote,” as leaders sought to finish negotiations before lawmakers reached the next funding cutoff.

Still, not all senators were prepared to support the agreement. After leaving the Capitol just before midnight Thursday, Senate Majority Leader John Thune said there were “snags on both sides” as Thune and Democratic leader Chuck Schumer tried to rally backing for the plan. Thune said, “Hopefully people will be of the spirit to try and get this done tomorrow,” while the Senate faced the possibility that the timetable could slip into a shutdown risk.

Sen. Lindsey Graham of South Carolina also signaled opposition late Thursday, saying he was among the senators objecting. Graham said Immigration and Customs Enforcement agents were being treated unfairly, and he has opposed House language that would repeal a new law allowing senators to sue the government for millions of dollars if their personal or office data is accessed without their knowledge.

The report said Democrats pressed for a two-week extension and indicated they were prepared to block a wider spending bill if their demands were not met, a dynamic that could deny Republicans the votes needed to advance the broader measure and potentially trigger a shutdown. The standoff comes against a recent backdrop: the country avoided a shutdown after a dispute earlier this year over expiring federal health care subsidies, which ended only after some moderate Democrats broke away to strike a deal with Republicans.

The talks between Trump and Schumer followed the fatal shootings of Alex Pretti in Minnesota over the weekend and Renee Good, the report said. It said Schumer described it as “a moment of truth,” adding, “The American people support law enforcement. They support border security. They do not support ICE terrorizing our streets and killing American citizens.” The report also said President Trump, during a Cabinet meeting before the Senate vote, said he wanted to avoid a partial government shutdown.

Democrats said their specific demands include ending “roving patrols” in cities and requiring the federal government to coordinate with local law enforcement when making immigration arrests, including tighter rules for warrants. They also urged an enforceable code of conduct that would hold agents accountable for violations, with Schumer saying agents should be required to have “masks off, body cameras on” and carry proper identification as is common practice in other law enforcement agencies.

Schumer told senators they wanted “common sense reforms,” and the report said Senate Democrats are united around those changes. Democratic Sen. Tina Smith of Minnesota said, “Boil it all down, what we are talking about is that these lawless ICE agents should be following the same rules that your local police department does,” and she added, “There has to be accountability.”

The report said federal negotiations on any longer-term Homeland Security bill are likely to be difficult. Democrats said they want the aggressive immigration crackdown to end, and Connecticut Sen. Richard Blumenthal said, “If the Trump administration resists reforms, we shut down the agency.” Republicans, meanwhile, appeared to resist at least some of the proposals. Graham said some Democratic proposals “make sense,” including better training and body cameras, but he said he would insist on new language tied to how local governments could resist the Trump administration’s immigration policies.

Thom Tillis of North Carolina said he opposed requiring immigration enforcement officers to show their faces, and he said he was concerned that pictures of officers could lead to threats against family members at home. The report said Graham, on the other hand, suggested lawmakers should adopt some reforms to ICE and Border Patrol while also ending what he described as “sanctuary city” policies.

While the Senate worked to advance the deal, the House faced additional uncertainty. The report said Speaker Mike Johnson told The Associated Press that he was “vehemently opposed” to breaking up the funding package but that if it is separated, “we will have to move it as quickly as possible” to ensure the government does not shut down. Johnson also said he might have “tough decisions” about when the House would return to Washington to approve any bills that were separated if they passed in the Senate, saying, “We’ll see what they do.”

House Republicans have said they do not want changes to the bill the House passed last week. A letter to Trump dated Tuesday, cited in the report, said members of the conservative House Freedom Caucus wrote that they stood with the Republican president and ICE and that the package “will not come back through the House without funding for the Department of Homeland Security.”

FRED figures referenced: none.