A $1.2 trillion funding package was approved by the US Senate in the early hours of Saturday following a last-minute consensus, thereby preventing a potential partial government shutdown.
The package, which fully funds the government through September, ends a months-long fight over spending that persisted six months into the fiscal year.
The legislation was approved by a vote of 74 to 24, and will now be sent to President Joe Biden to be signed into law.
"We have funded the government with significant investments for parents and kids and small businesses and health care workers and military families and so much more. Our efforts have paid off with a strong funding bill that now goes to President Biden's desk," Senate Majority Leader Chuck Schumer said on X.
Earlier he had said that an "agreement to complete the job of funding the government tonight" had been reached. "It wasn't easy, but tonight our persistence has been worth it. It is good for the American people that we have reached this bipartisan deal," he said.
The bill includes money for the departments of State, Homeland Security, Defense, Labor and Health and Human Services, as well as funds for foreign operations, financial services and the legislative branch. Another package, which funds the rest of the government, was passed by Congress two weeks ago.