Congress sent President Obama legislation on Wednesday to prevent a government shutdown, following a 277-151 vote in the House that will keep federal agencies funded through Dec. 11.

More Republicans voted against the spending bill than in favor of it, however.

Republicans objected to the inclusion of money for Planned Parenthood in the measure, leading 151 GOP lawmakers to vote against the bill, compared to only 91 who supported it.

ADVERTISEMENT

Every Democrat voted in favor of the legislation.

The vote also split the GOP lawmakers running for leadership positions in the wake of Speaker John Boehner John Andrew BoehnerLongtime House parliamentarian to step down Five things we learned from this year's primaries Bad blood between Pelosi, Meadows complicates coronavirus talks MORE’s (R-Ohio) surprise announcement last week that he is resigning at the end of October.

Majority Leader Kevin McCarthy Kevin Owen McCarthyMcCarthy's Democratic challenger to launch first TV ad highlighting Air Force service as single mother Trump asked Chamber of Commerce to reconsider Democratic endorsements: report The Hill's Morning Report - Sponsored by The Air Line Pilots Association - White House moves closer to Pelosi on virus relief bill MORE (R-Calif.), the heavy favorite to succeed Boehner, voted yes, as did GOP Whip Steve Scalise (La.), who is running to succeed McCarthy.

But Scalise’s opponent, House Budget Committee Chairman Tom Price (R-Ga.), voted no. So did Rep. Daniel Webster (R-Fla.), McCarthy’s only opponent so far in the Speaker race.

Reps. Pete Sessions (R-Texas) and Dennis Ross (R-Fla.), a deputy whip, who are both running to succeed Scalise, voted no; Rep. Patrick McHenry (R-N.C.), the chief deputy whip, and Rep. Markwayne Mullin (Okla.), two other contenders, voted yes.

The Senate approved the legislation earlier Wednesday in a 78-20 vote, and Obama signed it into law that evening. All 20 “no” votes in the Senate came from Republicans, though Sens. Marco Rubio (R-Fla.) and Lindsey Graham (R-S.C.), both running for president, missed the vote.

Without action by Congress, the federal government would have shut down on Thursday, the beginning of a new fiscal year.

Before Boehner’s decision to resign, there were real doubts that lawmakers would be able to act to prevent a shutdown.

Boehner was under pressure to move legislation without federal funding for Planned Parenthood, which has been under attack since the release of videos accusing the group of selling fetal tissue for profit. The healthcare provider has repeatedly said those charges are unfounded and that the videos are misleading.

Conservatives had warned Boehner they might file a motion to remove him as Speaker if he worked with Democrats to pass the short-term funding bill including Planned Parenthood funds. But once Boehner announced he would step down, conservatives lost their leverage.

In addition, Senate Republicans broadly favored moving the short-term measure even if it included money for Planned Parenthood, as did many House Republicans. They worried that provoking a shutdown would cost the GOP politically.

“We should never shut the government down over that or, frankly, any other issue,” said Rep. Charlie Dent (R-Pa.), a centrist and senior appropriator.

The question for Congress now becomes how to prevent a shutdown right before Christmas.

Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Senate GOP aims to confirm Trump court pick by Oct. 29: report Trump argues full Supreme Court needed to settle potential election disputes MORE (R-Ky.) on Tuesday said he, Boehner and Obama would launch formal budget talks soon. Those talks could also involve McCarthy.

Another challenge in the short term is raising the debt ceiling. Congress likely will have to take action on that issue this fall.

House Appropriations Committee Chairman Hal Rogers (R-Ky.) lamented having to turn to another stopgap bill after his panel spent months working on individual spending measures. House members toiled late into the night debating six of the 12 annual spending bills over the summer, only to see the process derailed after Democrats offered amendments regarding the display of the Confederate flag.

The Senate, meanwhile, has not passed any of the regular appropriations bills this year.

“The House this year got off to a great start, beginning our appropriations work at the earliest date since 1974,” Rogers said. “So it’s to my great dismay that we’ve arrived at this point once again requiring a temporary Band-Aid to buy us time to do our constitutionally mandated duty.”

Before final passage of the stopgap spending bill, the House passed a measure known as an “enrollment correction” to add language that would defund Planned Parenthood. But voting on it as an enrollment correction kept it separate from the underlying spending bill, therefore ensuring it would still reach Obama’s desk in time to avoid a shutdown.

“The majority’s triumph today is not shutting down the government,” said Rep. Steve Israel (D-N.Y.). “Success can’t be defined as avoiding catastrophe. And all we’re doing today is avoiding catastrophe.”

The Senate will likely reject the enrollment resolution, similar to the defeat of a spending bill last week that withheld Planned Parenthood funds.

The House has voted three times this month to eliminate federal funding for the group, including Wednesday’s vote.

Earlier this month, the House passed legislation authored by Rep. Diane Black (R-Tenn.) to freeze Planned Parenthood funds for a year while Congress conducts an investigation into the controversial videos.

And on Tuesday, the House passed a measure that would give states more flexibility in withholding Medicaid funds from healthcare providers that perform abortions.

Updated at 8:26 p.m.