The US House of Representatives has averted a government shutdown until September 2015, by passing a bill to give additional finances for the functioning of the government.
The House passed a $1.1tn (£700bn, €885bn) budget with 219 representatives voting in favour and 206 voting against the spending bill.
The country was due to shut down at midnight on 11 December.
Around 57 democrats voted for the bill after President Barack Obama urged the opposition to support the budget, while 67 Republicans rejected it. Republicans are the majority in both the House and Senate following the elections held in November.
While the budget will fund most of the government until September 2015, some departments will only receive short-term funding. The Department of Homeland Security will receive funds only until February, as the Republicans strongly oppose President Obama's immigration reforms.
The bill keeps domestic spending largely flat, while providing billions of dollars in additional funds to fight Islamic State militants in Iraq and Syria and the Ebola outbreak in West Africa.
In October 2013, the US government faced a partial government shutdown due to the US lawmakers' dispute over Obamacare, the president's signature health care law.
The Republicans later compromised and helped pass a $1.1bn spending bill in January.
The US government plunged into a partial shutdown on 1 October 2013 after the Congress failed to pass the budget for the next financial year.
Hundreds of thousands of federal employees were forced to go on unpaid leave and government offices were closed for more than two weeks. The Republicans had wanted Obama to modify or eliminate his pet healthcare programme in order to pass the bill.
The shutdown is estimated to have costed the US economy hundreds of millions of dollars, dragging down economic growth.