Bordering on dysfunction, Congress passed a one-week bill late Friday night to avert a partial shutdown of the Homeland Security Department, as leaders in both political parties quelled a revolt by House conservatives furious that the measure left President Barack Obama's immigration policy intact.

The president signed the bill just before midnight Friday.

The final vote of a long day and night was a bipartisan 357-60 in the House, a little more than an hour after the Senate cleared the measure without so much as a roll call.

That sent the legislation to the White House for Obama's signature, and capped a day of bruising political battles and rhetoric to match.

"You have made a mess," House Democratic Leader Nancy Pelosi said at one point to Republicans, as recriminations filled the House chamber and the midnight deadline neared for a partial shutdown of an agency with major anti-terrorism responsibilities.

Even some Republicans readily agreed.

"There are terrorist attacks all over world and we're talking about closing down Homeland Security. This is like living in world of crazy people," tweeted Rep. Peter King of New York, a former chairman of the Homeland Security Committee.

Hours after conservatives joined with Democrats to vote down a three-week funding measure, 224-203, the Senate presented a one-week alternative to keep open the agency, which has responsibility for border control as well as anti-terrorist measures.

That amounted to a take-it-or-leave it offer less than three hours before the deadline.

Some Republican opponents — members of a "Freedom Caucus" — sat together in the chamber as the vote total mounted in the legislation's favor.

This time, Pelosi urged her rank-and-file to support the short-term measure, saying it would lead to passage next week of a bill to fund the agency through the Sept. 30 end of the budget year without immigration add-ons. Aides to Speaker John Boehner promptly said there had been no such promise made.

Taken together, the day's roller-coaster events at the Capitol underscored the difficulty Republicans have had so far this year in translating last fall's election gains into legislative accomplishment — a step its own leaders say is necessary to establish the party's credentials as a responsible, governing party. Republicans gained control of the Senate in November's balloting, and emerged with their largest House majority in more than 70 years.

Further demonstrating GOP woes, House GOP leaders abruptly called off a vote on a major education bill that had attracted significant opposition from conservatives as well as Democrats and the White House. Aides attributed that decision to the need to work separately on rounding up enough votes to pass the funding measure for Homeland Security.

For their part, tea party conservatives in the House unflinchingly defended their actions.

"It does not make any difference whether the funding is for three weeks, three months or a full fiscal year. If it's illegal, it's illegal," said Rep. Mo Brooks, R-Ala.

He referred to a pair of immigration directives issued by Obama. The first, in 2012, lifted the threat of deportation from many immigrants brought to the country illegally as youngsters. Another order last fall applied to millions more who are in the United States unlawfully.

The unexpected House defeat of a three-week spending bill was accomplished by 52 conservatives upset by the deletion of the immigration provisions, alongside solid opposition from Democrats who wanted the agency funded through Sept. 30.

That set an unpredictable chain of events in motion. Homeland Security officials circulated a lengthy contingency plan indicating that about 30,000 employees could expect to be furloughed without passage of funding legislation.

Then the White House announced Obama had spoken with Pelosi and Senate Democratic Leader Harry Reid. Moments later, Majority Leader Mitch McConnell of Kentucky strode onto the Senate floor and swiftly gained approval for the seven-day measure.

The Senate had waited all day to play its part in the funding of the agency.

Earlier, a largely symbolic attempt to advance legislation that would repeal Obama's immigration directive of last fall failed on a vote of 57-42, three short of the 60 required.

That separate proposal was "commonsense legislation that would protect our democracy from the egregious example of executive overreach we saw in November," said McConnell, who successfully led his rank and file in recent days to a decision to pass Homeland Security legislation without immigration-related provisions.

Some House Republicans said the entire strategy of passing a short-term measure and seeking negotiations on a longer-term bill that included changes in Obama's immigration policy was flawed. They noted that Senate Democrats had demonstrated their ability to block any challenges to Obama's immigration policies, and that the president had vowed to veto them in any event.

"Some folks just have a harder time facing political reality than others," said Rep. Charlie Dent, R-Pa., speaking of other Republicans.

———————————————

Statements from Congressional representatives:

District 10 Rep. Daniel Webster

“Over six weeks ago, the House of Representatives passed bipartisan legislation that fully funded the Department of Homeland Security while simultaneously reining in the President’s egregious executive overreach on immigration.  Until today, as we sit on the precipice of DHS funding lapsing, the Senate was unable to act.

“While I am disappointed that Senate Democrats obstructed this process in an effort to shield the President’s immigration overreach from debate, I am pleased they finally relented in at least allowing DHS to be funded at the eleventh hour.

“As regular order dictates, both chambers should now go to conference to reconcile the differences between these two positions. The House has passed a short term funding measure to ensure that our national security efforts will remain fully funded and operational while these negotiations take place.

“The Senate should immediately appoint conferees and begin negotiations with respect for the Constitution’s clearly defined separation of powers between the legislative and executive branches.”

Congresswoman Corrine Brown

“I strongly believe that House Republicans need to revisit the oath of office they took when they were first elected to Congress:

‘I, Corrine Brown, do solemnly swear that I will support and defend the Constitution of the United States against all enemies, foreign and domestic; that I will bear true faith and allegiance to the same; that I take this obligation freely, without any mental reservation or purpose of evasion; and that I will well and faithfully discharge the duties of the office on which I am about to enter. So help me God’ (5 U.S.C. §3331).

“Beyond a doubt, the proposal put forth by the House Appropriations Committee today miserably fails one of our country’s most necessary security programs and puts our nation in dire jeopardy.  The Department of Homeland Security (DHS) is vital to protect our country on all fronts, and we must do what is necessary to ensure the safety of our nation.  To allow the House Republican legislation to move forward would put America and our families at grave risk at a time when we face broad threats at home and abroad. Indeed, America cannot afford a lapse in funding for DHS, and it is critical that we restore certainty in funding immediately. I strongly urge Republicans leaders to take responsible action and pass a clean bill to fund DHS without delay.

In the words of Republican Senator Mark S. Kirk of Illinois, ‘as a governing party, we’ve got to fund D.H.S. and say to the House, Here’s a straw so you can suck it up…this battle should be the end of the strategy of attaching whatever you’re upset at the president to a vital piece of government.’ 

Moreover, recent terrorist episodes add urgency to the need to keep the department functioning seamlessly. As Senate Minority Leader Harry Reid said, ‘ISIS appears to have money, terrorists appear to have money, (so) why shouldn’t our homeland have the ability to protect itself?’

Certainly, a DHS shutdown would furlough or deny pay to 16,575 law enforcement officials, disaster response officials, and many other DHS personnel in Florida alone. And despite dire warnings from Members of their own Party, House Republicans voted to block a clean funding bill that could keep our communities safe.  Our national security is too important and the world is far too dangerous for the Republican Congress to play these irresponsible, reckless games.  Even the Republican controlled Senate passed a clean funding bill, yet House Republicans have chosen to keep gambling with America’s homeland security.

Without action, the bulk of DHS’s management and support of the homeland security infrastructure that was built following the 9/11 terrorist attacks would be shuttered.  Law enforcement officials, border patrol agents, disaster response officials, counterterrorism experts and other DHS personnel that help keep our nation safe would either be furloughed or required to work without pay.

Consequences of a shutdown of the Department of Homeland Security include: closing the DHS Domestic Nuclear Detection Office, which would no longer alert and coordinate with local law enforcement agencies, and withholding the Securing the Cities grants that pay for critical nuclear detection capabilities in cities across the country; halting Research and Development work on countermeasures to devastating biological threats, on nuclear detection equipment, and on cargo and passenger screening technologies; crippling FEMA’s preparations for future disasters, furloughing 22 percent of FEMA personnel; and ending FEMA training activities with local law enforcement for Weapons of Mass Destruction events.

Providing funding to the Department of Homeland Security is essential to keeping our nation safe and defending our citizens from nefarious threats such as the one posed by the three people arrested this week.  And the Republican Party’s holding the security of our homeland hostage is irresponsible, dangerous, and inconsistent with their oath of office pledge to protect and defend America and to keep U.S. citizens safe.”