WASHINGTON - The U.S. Senate is expected to give Congress' final approval on Friday of legislation funding several federal agencies through September, averting a partial government shutdown that otherwise would begin at midnight.

The House of Representatives on Wednesday passed by a vote of 339-85 the package of fiscal 2024 appropriations bills to keep operations running for agriculture, transportation, housing, energy, veterans and other programs.

But 83 of House Speaker Mike Johnson's Republicans defied their leadership and voted "no," requiring strong support from opposition Democrats to get the bill over the line.

The vote left a bitter taste for far-right Republicans who fought hard to get deeper spending cuts amid a nearly $34.5 trillion national debt.

This capped more than a year of havoc in the House as its right-wing Freedom Caucus Republicans stoked intra-party battles over choosing a speaker -- not once but twice -- and blocking or delaying many of the 12 annual spending bills to keep government operating.

Nonetheless, House Appropriations Committee Republicans, following the vote, boasted in a statement that with this legislation they have reversed the trajectory of accelerating government spending, delivering on a 2022 campaign promise.

House Democrats highlighted the Republican upheaval, along with their own role in breaking the budget logjam on Wednesday.

"House Democrats are Team Normal ... House Republicans and Donald Trump are Team Extreme," said Representative Pete Aguilar, who heads the House Democratic Caucus.

"They lurch from crisis to crisis," he added.

While the Senate is expected to easily pass the package and send it to Democratic President Joe Biden for signing into law, that will not mark the end of fights to fund the fiscal year that began in October.

Still to come is the debate over a final bunch of bills for the military, homeland security, health programs, financial services, foreign operations and other annual funding. Congress faces a March 22 deadline for passing these.

All these bills were supposed to have been enacted into law by last Oct. 1, the start of the 2024 fiscal year. While Congress rarely meets that deadline, this has been an unusually long and chaotic tardiness.

In past spending battles, Congress has breached its midnight deadline, having to labor into the weekend to achieve passage of the funding.

Congress so far has had to approve four temporary funding bills to keep agency operations limping along at their previous year's levels.

(Reporting by Richard Cowan; Editing by Scott Malone and Diane Craft)