A Department of Homeland Security shutdown grew increasingly likely Monday, with lawmakers fighting over funding for the US agency amid a bitter standoff about President Barack Obama’s immigration reform plan.

Facing a Friday deadline, Senate Democrats for a fourth time blocked a measure that would fund the department tasked with protecting Americans and securing the border.

Lawmakers want to see DHS fully funded, particularly during the current heightened threat environment.

But the $40 billion bill contains Republican amendments that would repeal Obama’s plan to shield millions of people from deportation, changes that Democrats do not support.

With the blame game in full swing, it appeared increasingly likely Congress would fail to fund DHS before the midnight Friday deadline.

“We’re in a bit of a boxed canyon here and I think we all know that,” Republican Senator Jeff Flake said after the vote.

“Right now, it does seem to be where we’re headed,” White House spokesman Josh Earnest said of a possible shutdown.

All Senate Democrats voted against the measure, along with Republican Dean Heller.

He and his office gave no indication whether he would follow that up with a clean DHS funding bill.

Republicans including Flake and Senator John McCain have said they would support passing a temporary funding extension, a possible last-minute way to avoid a lapse.

Some House Republicans have indicated they might be willing to test a partial DHS shutdown, arguing that essential personnel would keep working.

House leaders have not indicated how they will proceed.

“It’s going to be difficult for them to move anything,” Flake said of the House. “There are a lot of people dug in.”

Obama fought back Monday against efforts to block his immigration order, urging a federal court to allow the shielding of deportations and demanding Congress fund DHS.

The Justice Department filed a motion calling for a Texas district court to stay its injunction issued against Obama’s plan last week, which was a blow to his efforts to reform a system most lawmakers agree is broken.

‘Break the impasse’

And DHS Secretary Jeh Johnson called on Congress to act immediately to prevent shutdown.

“If Congress wants to have a debate about immigration, the president and I welcome that debate,” he said.

“But don’t tie that debate to the funding of the men and women standing behind me,” he told reporters, urging lawmakers to “figure out a way to break the impasse.”

Should Congress fail to agree on funding, agents including border security personnel, airport screeners, and Secret Service agents tasked with protecting the president would remain on the job without pay.

Funds for new border agents, training and equipment would be frozen. Crucial emergency management programs would halt.

“This is no way to run a government,” Johnson said.

Obama himself hammered the point to state governors gathered at the White House, where he warned of trickle-down effects of withholding 100,000 salaries.

“It will have a direct impact on your economy, and it will have a direct impact on America’s national security,” Obama said.