The US Congress on Friday approved $12.3 billion in aid to help Ukraine fight its invasion by Russia under a makeshift spending bill that averts a chaotic government shutdown before a midnight deadline.

The package includes $3 billion in arms, supplies and salaries for Ukraine’s military and authorizes President Joe Biden to direct the Pentagon to transfer $3.7 billion worth of weapons and other hardware to Ukraine.

The so-called “rolling resolution” — passed 230-201, with 10 Republicans supporting Democrats — also provides Kyiv with $4.5 billion to keep the country’s finances stable and the government afloat .

The allocation brings the US contribution to the war effort to $65 billion. It was approved just hours after Russian President Vladimir Putin annexed four Moscow-held regions of Ukraine, despite warnings from the West.

“This new grant aid is further evidence of US confidence in Ukraine and will support critical government operations and provide assistance to the Ukrainian people suffering from Russia’s brutal war,” Treasury Secretary Janet Yellen said in a statement.

“Crucially, this funding will also help bolster Ukraine’s valiant resistance to Putin’s illegal war of aggression. We call on other donors not only to accelerate their existing disbursements to Ukraine, but also to increase the scope of their assistance.”

Government shutdowns threaten the finances of hundreds of thousands of workers who risk being sent home without pay when parks, museums and other government properties close.

The emergency solution, which will keep federal agencies open until Dec. 16, acquitted the Senate by a comfortable 72-25 votes on Thursday.

It includes $1 billion in winter fuel grants for low-income families, $20 million for a drinking water crisis in Jackson, Mississippi, and billions in disaster relief for various states.

His passing was unusually dramatic this time, as lawmakers were keen to skip the city and return to campaigning before midterm election day on Nov. 8.

The only controversial issue was a proposal attached to the package to speed up the approval process for large energy projects.

But its author Joe Manchin, a Democrat with extensive interests in the fossil fuel industry, agreed to drop the text after acknowledging he didn’t have the support and risked scuttling the entire package.

Lawmakers rejected a White House request for billions of dollars for the nation’s response to Covid-19 and monkeypox amid staunch Republican opposition.

The president last week declared the pandemic “over,” paving the way for Republicans to get the motion overturned.