The legislation, which would extend government funding through mid-January, now heads to the Senate, where Democratic and Republican leaders have voiced support.
To prevent a shutdown, the Senate and Republican-controlled House must enact legislation that President Joe Biden can sign into law before current funding for federal agencies expires at midnight on Friday.
The 336-95 vote was a victory for House Speaker Mike Johnson, who faced down opposition from some of his fellow Republicans, in the first consequential vote of his tenure.
Johnson was elected to the post less than three weeks ago, following weeks of tumult that left the chamber without a leader. With a slim 221-213 majority, he can afford to lose no more than three Republican votes on legislation that Democrats oppose.
Senate Majority Leader Chuck Schumer, a Democrat, said in a statement on Tuesday night after the vote that he was pleased the bill passed “with a strong bipartisan vote,” adding that he would work with his Senate Republican counterpart, Mitch McConnell, to pass it “as soon as possible.”
The stopgap spending bill would extend government funding at current levels into 2024, giving lawmakers more time to craft the detailed spending bills that cover everything from the military to scientific research.
Some Republicans on the party’s right flank said they were frustrated that it did not include the steep spending cuts and border-security measures they sought.
The bill passed with 209 Democratic and 127 Republican votes, while 93 Republicans and two Democrats voted against it.
Johnson’s predecessor as speaker, Kevin McCarthy, was ousted by a handful of Republicans after a similar vote in September that relied on Democratic votes to avert a shutdown.
But hardline conservatives said they were not turning against Johnson. “We don’t support it. But we do support him,” said Representative Bob Good.
Other Republicans said it was better than other options.
“This isn’t ideal,” Republican Representative Mike Garcia said. “But a shutdown is a far worse world to be in.”
Johnson’s bill would extend funding for military construction, veterans benefits, transportation, housing, urban development, agriculture, the Food and Drug Administration and energy and water programs through Jan. 19. Funding for all other federal operations – including defense – would expire on Feb. 2.
Congress is in its third fiscal standoff this year, following a months-long spring impasse over the more-than-$31 trillion in US debt, which brought the federal government to the brink of default.
The ongoing partisan gridlock led Moody’s on Friday to lower its credit rating outlook on the US to “negative” from “stable,” as it noted that high interest rates would continue to drive borrowing costs higher.