Congress struggled Thursday to avert a government shutdown Friday, with an early afternoon vote in the House canceled as lawmakers realized they might not have enough votes to pass a $1.01-trillion spending bill.

House leadership had expected to wrap up its work for the year, including the vote on the spending bill, by 2:30 Thursday afternoon. Instead, shortly after 2 p.m., the House went into recess rather than vote on the bill.United States Capitol

Prior to the recess, a vote to proceed to debate and passage of the spending bill barely passed –in a 214-212 vote. Democrats were furious about two policy riders added to the spending bill–one of which would weaken a Wall Street reform act from 2010 and the other which would allow a tenfold increase in campaign donations. Sixteen Republicans joined all 196 Democrats in voting no, with Republicans primarily angry that funding the Department of Homeland Security through a short-term continuing resolution did not go far enough in preventing the president from implementing his immigration reform plan.

The White House issued a memo in support of the spending bill despite the two policy issues and concerns about funding most but not all the government departments with a full-year spending bill. “The Administration urges the Congress to enact comprehensive full-year appropriations legislation for all Government functions free of provisions that have no place in annual appropriations bills,” the memo notes but still urges passage of the bill.

House Minority Leader Rep. Nancy Pelosi (D-Calif.), however, slammed the bill on the House floor.

“I was so really heartbroken–I don’t think I’ve ever said that word on the floor of the House–heartbroken to see the taint that was placed on this valuable appropriations bill from on high. I’m sorry that we cannot have a full Homeland Security bill, that’s for sure…but the taint I refer to is what the president described in his letter today as a ‘rider that would amend the Dodd-Frank Wall Street Reform and Consumer Protection Act and weaken a critical component of financial system reform aimed at reducing taxpayer risk.’”

“I respect decisions that Members will make because there are equities to be weighed here,” she said, noting the Democrats were being asked to choose between the policy riders and a government shutdown. But though she said the rest of the bill was a good compromise overall, “it will not have my support.”

Minority Whip Steny Hoyer (D-Md.) spoke against the two policy riders but in decidedly less fiery terms than Pelosi. Hoyer said the two issues “put this bill at risk” and added that a majority of Democrats would vote for the bill if the two–a matter of a few paragraphs in a 1,603-page bill–were removed.

Other Democrats railed against the bill on the floor throughout Thursday. House Appropriations homeland security subcommittee ranking member Rep. David Price (D-N.C.) said that funding DHS through a continuing resolution rather than a new spending bill would leave the department unable to pursue new procurement, such as additional security at the White House in light of recent security breaches, as well as hurt the nation’s ability to respond to terror threats at home or deal with the immigration crisis at the Southern border.

“It leaves me unable, in good faith, to recommend a yay vote,” he concluded.

In light of the fierce Democratic opposition to the spending bill, the White House spent the afternoon calling congressmen to try to convince them to change their minds. A congressional source said Republican leadership was waiting to see if the White House would be able to exert any influence before determining how the rest of the evening would proceed, leading up to a midnight deadline to avoid the second shutdown in 15 months. The source was confident a shutdown would be averted, saying leadership would either proceed with the vote on the spending bill as planned if the votes were there or put forward a three-month continuing resolution for the whole government.

To keep the government open, though, the Senate would have to pass something Thursday night, be it the three-month CR or a short-term CR to keep the government open until Senators could vote on the spending bill Friday or Saturday.