The controversial $1.1 trillion US federal budget has finally been approved by the US Senate, preventing a repeat of a government shutdown.
The budget will now be sent to President Obama to be finally signed off.
The Senate only managed to pass the bill by 56-40 during a late-night vote on Saturday.
The Spending bill has caused huge controversy between the Republicans and the Democrats, exposing differences between the two parties that neither have been willing to back down on leading to the delay in the approval of the spending bill.
In the end both of the parties have been forced to make concessions to finally pass the bill which has meant they have managed to avoid a government shutdown due to a lack of finances to pay for federal services.
Members of the Republican party had used the spending bill to try and force President Barack Obama to try and give up his controversial immigration reforms. To do this they had tried to deny funding to the Department of Homeland Security.
As from January the Republicans will hold a majority in both houses of Congress, which they will hope to use to block the adoption of President Obama’s amnesty programme for some illegal immigrants.
According to the BBC the Democrats were unhappy at the repeal of financial regulation clauses. But others said it was hard to vote against the bill considering its scope and the fact the Democrats will be in a worse position to negotiate next year.
To try and avoid a repeat of a government shutdown Congress twice passed emergency funding bills to buy more time for an agreement, with the latest extension coming earlier on Saturday to see funding extended into the middle of next week, however this was not needed in the end with the bill finally being approved.
According to the BBC, the 1,600-page bill also included a number of provisions intended to gain votes from both parties, including: increasing the amount an individual person can contribute to a national political party from $32,400 to $324,000, blocking the District of Columbia from using its own funds to set up regulatory systems for marijuana legalisation, blocking certain Environmental Protection Agency (EPA) regulations, cuts in the budgets of the EPA and the US tax agency and increases in the budget for Wall Street regulation agencies, including the Securities and Exchange Commission.