The Senate overwhelmingly gave final approval early Saturday to a $1.2 trillion spending bill to fund more than half of the government, effectively averting a shutdown by sending the legislation to President Biden’s desk just hours after a midnight deadline.
The 74-to-24 vote, which concluded about 2 a.m., capped an extraordinary day on Capitol Hill that began with a big bipartisan vote to speed the measure through the House, which set off a conservative revolt and prompted one Republican to threaten a bid to oust Speaker Mike Johnson from his post.
The Senate action came more than 12 hours after the House vote, after intense haggling to arrange a series of politically charged votes on proposed changes to the legislation that Republicans had demanded that threatened to push the government into a brief partial shutdown into the weekend.
The White House said in a statement minutes after the midnight deadline that federal officials had “ceased shutdown preparations” in anticipation of Mr. Biden signing the legislation later Saturday. But the delay underscored the difficulties that have plagued spending negotiations from the beginning and was a fitting coda to an excruciating set of talks that are on track to finally fund the government through the end of the fiscal year, Sept. 30, six months behind schedule.
“It’s been a long day, a long week and a very long few months,” said Senator Chuck Schumer, Democrat of New York and the majority leader. “But tonight, we have funded the government with significant investments for parents and kids, and small businesses and health care workers, military families, and so much more. It’s no small feat to get a package like this done in divided government.”
Earlier on Friday, in a 286-to-134 vote that came down to the wire in the House as leaders scrounged for the two-thirds majority needed for passage, Democrats rallied to provide the support to overcome a furious swell of opposition by conservative Republicans.
Infuriated by the bipartisan spending agreement to keep federal funding flowing for the Pentagon and Department of Homeland Security, the hard right balked, and as the vote was still ongoing, Representative Marjorie Taylor Greene of Georgia began the process of calling for a vote to oust Mr. Johnson.
Ms. Greene told reporters on the House steps minute after the vote that she would not seek an immediate vote on his removal, but had begun the process as a “warning” because his actions were a “betrayal.”
“This was our leverage,” Ms. Greene said of spending legislation. “This is our chance to secure the border, and he didn’t do it. And now this funding bill passed without the majority of the majority.”
The 1,012-page legislative package, which lumped six spending bills together, faced an uphill climb in the House after ultraconservatives revolted over the measure. They delivered a series of incensed speeches from the floor that accused Mr. Johnson of negotiating legislation that amounted to an “atrocious attack on the American people,” as Ms. Greene put it.
No other Republican has publicly supported ousting Mr. Johnson, and Democrats have signaled in recent weeks that they might be inclined to help protect him should he face a G.O.P. threat to his post.
But the bill’s passage came at a steep political price for the speaker, who was forced to violate an unwritten but sacrosanct rule among House Republicans that Ms. Greene alluded to against bringing up legislation that cannot draw support from a majority of their members. Just 101 Republicans, fewer than half, supported it.
That left it to Democrats to supply the bulk of the votes to push the bill through.
“Once again, it’s going to be House Democrats that carry necessary legislation for the American people to the finish line,” Representative Hakeem Jeffries of New York, the Democratic leader, told reporters at the Capitol ahead of the vote.
Republicans won the inclusion of a number of provisions in the spending package, including funding for 2,000 new Border Patrol agents, additional detention beds run by Immigration and Customs Enforcement and a provision cutting off aid to the main U.N. agency that provides assistance to Palestinians. It also increases funding for technology at the southern border by about 25 percent, while cutting funding for the State Department and foreign aid programs by roughly 6 percent.
“House Republicans achieved conservative policy wins, rejected extreme Democrat proposals and imposed substantial cuts while significantly strengthening national defense,” Mr. Johnson said in a statement after the vote. “The process was also an important step in breaking the omnibus muscle memory and represents the best achievable outcome in a divided government.”
Yet conservatives said the legislation was insufficiently conservative, citing the $1.2 trillion price tag. They were particularly infuriated to see $200 million in fresh funding for the new F.B.I. headquarters in Maryland, as well as earmarked funding requested by senators for L.G.B.T.Q. centers.
“We got rid of all our poison riders, and Schumer wouldn’t agree to take away their poisonous earmarks,” said Representative Robert Aderholt, Republican of Alabama, referring to Senator Chuck Schumer of New York, the majority leader. Mr. Aderholt, the chairman of the Appropriations subcommittee overseeing labor and health programs, opposed the legislation.
Before the vote on Friday morning, Representative Andy Biggs, Republican of Arizona, had fumed that the bill was “chock-full of crap” and urged Mr. Johnson to be more combative in negotiations with Democrats.
“Doggone it, fight!” Mr. Biggs said. “This is capitulation, this is surrender.”
Democrats secured a combined $1 billion in new funding for federal child care and education programs, and a $120 million increase in funding for cancer research.
“This legislation does not have everything either side may have wanted,” said Representative Rosa DeLauro of Connecticut, the top Democrat on the Appropriations Committee. “But I am satisfied that many of the extreme cuts and the policies proposed by House Republicans were rejected.”
Standing on the House floor minutes later, Mr. Biggs ruefully agreed with Ms. DeLauro’s assessment.
“And yet somehow Republicans are going to vote for that?” he said. “That’s outrageous. She’s right, though: She got the spending. She killed the riders.”
Robert Jimison contributed reporting.