WASHINGTON — The Senate on Monday delivered a strong vote of confidence to a bipartisan spending bill that’s needed to head off a government shutdown at midnight Wednesday.

The 77-19 vote powers the measure past a filibuster by some of the chamber’s most ardent conservatives, who were angered that Majority Leader Mitch McConnell, R-Ky., stripped a provision that would cancel federal funding of Planned Parenthood in exchange for keeping the government open.

McConnell is under fire from tea partyers who demand that he fight harder against Planned Parenthood – even at the risk of a partial government shutdown – but McConnell is more concerned with protecting his 2016 re-election class from political damage if Republicans are blamed for a shutdown.

Last week, Democrats led a filibuster of a Senate stopgap measure that would have defunded Planned Parenthood. Eight Republicans did not support that measure, leaving it short of a simple majority, much less the 60 votes required to overcome the filibuster.

The current bill is “the only viable way forward in the short term,” McConnell said. “It doesn’t represent my first, second, third or 23rd choice when it comes to funding the government, but it will keep the government open through the fall.”

The Senate is expected to approve the bill Tuesday and send it to the House. Both of Maine’s senators, Susan Collins, R, and Angus King, I, voted in favor of the bill.

The White House endorsed the measure since it would allow “critical government functions to operate without interruption, providing a short-term bridge to give the Congress time to pass a budget for the remainder of the fiscal year.”

The measure would keep the government’s doors open through Dec. 11.

The Planned Parenthood fight helped topple House Speaker John Boehner, who announced his resignation last week.