The Senate approved a bill to extend funding for the federal government until the end of the US fiscal year, which ends on 30 September.
The document was supported by 54 senators, 46 spoke against it. Next, the bill will be sent for signature to US President Donald Trump, who has already expressed support for it.
If the document was not approved before 23:59 on March 14 local time, there would be a shutdown, which would threaten to stop the work of a number of government departments and programmes, temporary suspension of payment of salaries to hundreds of thousands of civil servants.
Earlier this week, the House of Representatives, under Republican control, had already passed the bill. It calls for keeping spending at about $6.75 trillion per fiscal year.
Democrats have spoken out against the bill because of Trump’s campaign to cut spending and cut tens of thousands of jobs.
In the US, the fiscal year runs from 1 October to 30 September. With no budget for the current fiscal year passed by Congress or signed by the president, federal agencies are usually funded through temporary extension resolutions at the previous fiscal year’s level.