House Republican leaders had a plan and were fairly confident it would work. Last week, the Senate easily passed emergency disaster funding and urged the House to follow suit. This week, House GOP leaders decided to respond by thumbing their noses at the Senate, including disaster aid in a larger spending bill, offsetting the costs by slashing a clean-energy program, and would tell the Senate to pass the bill or they’d shutdown the government.

All they had to do was pass the larger measure, called a “continuing resolution” (CR), which would keep the government running, and would set the stage for another showdown. Boehner, Cantor, and company thought they had the votes. They didn’t.

The surprise defeat in the House Wednesday of a special funding measure to keep the federal government functioning past Sept. 30 was a sharp rebuke of the GOP leadership that controls the chamber and a testament to the fragility of the majority itself.

The rejection of the measure resurrected the specter of a government shutdown at the end of the month and suggested that the heated confrontations that dominated Washington in the spring and early summer are likely to return this fall.

While it is widely expected that the parties will eventually reach a compromise to avoid a shutdown, Wednesday’s 230-to-195 vote showed what can happen when the GOP majority operates with no more than minimal Democratic support.

It wasn’t especially close, with Republicans coming 23 votes short of passage. In all, nearly every Democrat balked at the bill, under pressure from party leaders, and 48 House Republicans also rejected the measure. For Dems, it was important to reject the CR that played games with emergency disaster relief, and for the 48 GOP lawmakers who voted no, they wanted their caucus to renege on last month’s agreement and push for more spending cuts.

There are plenty of angles to keep in mind — most notably the fact that Speaker John Boehner (R-Ohio) just doesn’t have much control over his radicalized caucus — but perhaps the most pressing issue is the calendar. If Congress doesn’t approve a CR over the next eight days, the government will shut down.

At this point, House Republican leaders have a decision to make. They can:

1. Give up on holding disaster aid hostage, put the Senate’s FEMA bill in the CR, and pass it. The bill would then sail through the Senate and avoid a shutdown, but it would further weaken Boehner’s leadership.

2. Abandon the deal Boehner struck with Democrats last month, cut more spending, and pick up votes from the far-right flank. The Senate would reject this immediately, making a shutdown almost unavoidable. The Speaker’s word would become useless, but the right would be happy.

3. Find some different offsets to pay for disaster relief, which some Dems may find acceptable.

4. Remove disaster aid from the CR altogether, and take the issue up as a separate legislative debate.

A decision will have to be made fairly quickly — the deadline is a week from tomorrow, and Congress is supposed to be out next week.

Our ideas can save democracy... But we need your help! Donate Now!

Follow Steve on Twitter @stevebenen. Steve Benen is a producer at MSNBC's The Rachel Maddow Show. He was the principal contributor to the Washington Monthly's Political Animal blog from August 2008 until January 2012.