The United States Senate has passed a $1.1 trillion spending bill that lifts the threat of a government shutdown.
The vote sends the bill, which provides funding for most government agencies through until next September, to the President to sign into law.
Passage of the bill has been marked by weeks of haggling and efforts to stall the process by Tea Party firebrand Ted Cruz who was seeking to derail President Obama's controversial immigration plans.
The legislation also provides $5 billion for operations to counter the Islamic State, $5 billion in emergency funding to respond to the Ebola crisis, and prevents detainees at the Guantanamo military prison from being transferred to the United States.
Reuters reports the legislation largely eliminates government shutdown worries for financial markets through next fall by funding most government agencies through September 2015.
The Department of Homeland Security will be treated differently, getting a funding extension only through to 27 February, by which time Republicans will control both chambers of Congress.
Republicans insisted on the shorter leash for the department so that they can try to deny the agency any funds for implementing Mr Obama's recent order easing deportations for millions of undocumented immigrants.