ARTICLE AD BOX
By Sam Cabral
BBC News, Washington
The US House of Representatives has voted to approve a $467.5bn (£367bn) spending package, the first step in averting a partial government shutdown.
Funding for roughly 30% of the federal government - including agriculture, energy, housing and veterans' affairs - is due to expire at midnight on Friday.
The House-passed bill now goes to the US Senate, where leaders have vowed to back the measure "with time to spare".
But the threat of shutdown looms over Congress once again in just two weeks.
On Wednesday, House lawmakers voted 339-85 on the sprawling package of six funding bills, a compromise jointly agreed between House and Senate leaders after months of negotiation.
Once it passes the Senate and is signed by President Joe Biden, the 1,050-page piece of legislation would extend the funding available for dozens of federal programmes from 8 March until 30 September.
Negotiators, however, have much left to agree on before another funding deadline - on 22 March - for major government agencies such as the defence, homeland security and state departments.
Capitol Hill has been embroiled in bitter spending fights for the past six months between Republicans, who run the House, and Democrats, who lead in the Senate.
House Speaker Mike Johnson has had his work cut out for him by an increasingly narrow Republican majority and, more recently, by conservative rebels.
With the country $34.4tn in debt, the right-wing House Freedom Caucus has demanded spending cuts that often go much deeper than what their Democratic colleagues would accept.
But Mr Johnson told reporters on Wednesday that Republicans "have to be realistic about what we're able to achieve" with their wafer-thin majority.
As has become the case with recent spending measures, he had to turn to Democrats for the votes needed to pass the bill.
It is a move that contributed to the dramatic ousting of his predecessor, Kevin McCarthy, last year.
As many as 83 Republicans voted against the bill on Wednesday, with the Freedom Caucus issuing a statement that it "punts on nearly every single Republican policy priority", including immigration.
"Republicans will go around and talk about how they scored major wins, how they somehow delivered for the American people," Texas congressman Chip Roy said on the House floor. "The fact of the matter is we did no such thing."
While the Speaker touted 6% of spending cuts to the FBI, a 10% cut to the Environmental Protection Agency and a 7% cut to the Bureau of Alcohol, Tobacco, Firearms and Explosives, it was the Democrats who celebrated the final product.
Rosa DeLauro of Connecticut told reporters her party had managed to prevent cuts to food and nutrition programmes. They also defeated a Republican effort to defund expanded access to abortion pills.
"This legislation does not have everything either side may have wanted, but I am pleased that many of the extreme cuts and policies proposed by House Republicans were excluded," she said.
By Wednesday night, the Senate had begun deliberating over the bill and was expected to approve it without significant opposition.
The breakthrough comes at an opportune time for President Biden, who will deliver his State of the Union address to Congress on Thursday.