WASHINGTON, Nov 14 (Reuters) - The US House of Representatives on Tuesday (Nov 14) passed a stopgap measure to avert a partial federal government shutdown, as wide swaths of lawmakers from both parties showed support for the bill.

The short-term legislation 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.

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.

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.

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-US$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.

Photo from AFP