WASHINGTON -- A bill to avoid a shutdown of the Department of Homeland Security died on the House floor late Friday afternoon. With only hours until the agency shuts down, the bipartisan defeat of the bill sent Republican leadership scrambling to find a way to fund DHS.

It was a devastating blow for Speaker John Boehner and the House Republican leadership, which refused to allow a vote on a bipartisan Senate amendment that would have funded DHS through September. GOP House leaders had hoped to pass a three-week stopgap that would allow them to continue to fight President Barack Obama’s immigration executive orders. The political repercussions of shutting down DHS could be significant for Republicans.

(In the short term, at least, the optics are more dramatic than the actual operational effect. Essential personnel will still report to work, although their paychecks will be held up.) 

The bill was defeated 203-224. House Democrats opposed the bill because Republican leadership wouldn’t allow a vote on the Senate-passed legislation (which funds Homeland Security without being tied to a rollback of Obama's immigration actions). House conservatives opposed the bill because they wanted to press the fight against the president now. Together, they sunk the three-week continuing resolution.

Leadership kept the vote open for almost an hour, appealing to Republicans on the floor to switch their votes. Ultimately, they were unsuccessful. House Majority Leader Kevin McCarthy announced after the vote that late Friday and weekend votes were still possible.

The Senate on Friday morning passed a bill that would have funded the agency through September. But House Republicans, unhappy that the Senate version didn’t reverse the immigration orders, refused to give the bill a vote.

The House may be unable to revive the Senate bill after the stopgap was defeated. That’s because in a move to appease some members, they voted to send the Senate bill back before voting on the continuing resolution.

This isn’t the first time differences within the Republican caucus have caused funding problems. In December, Republican leadership struggled to find the votes to pass a funding bill to avoid a shutdown. And it was House Republicans in leadership who struggled to find a resolution to avoid and then end the 16-day government shutdown.