Senators passed the bill in a vote of 74 in favor and 24 opposed.
Earlier, the White House ceased preparations for a government shutdown as it was confident the US Senate would pass the spending bill shortly after missing the midnight deadline late Friday night.
"OMB [Office of Management and Budget] has ceased shutdown preparations because there is a high degree of confidence that Congress will imminently pass the relevant appropriations and the President will sign the bill on Saturday," the White House said shortly after midnight on Friday.
Then it became known that the US Senate reached a deal to pass the bill and would vote on it shortly on Friday night. However, they missed the midnight deadline to avert a partial government shutdown.
The bill includes funding for the US Departments of Defense, Financial Services, Homeland Security, Labor, Health, and Education, the Legislative Branch, and the State and Foreign operations, including $300 million for the Ukraine Security Assistance Initiative and $3.3 billion for Israel.
The most recent and the longest shutdown in the United Stated happened in late 2018 into early 2019 under Donald Trump, lasting for 34 days.