The US Senate has agreed a sweeping two-year budget agreement in a bid to avoid government funding running out on Thursday evening.

In a rare bipartisan breakthrough, the Democratic and Republican Senate leaders agreed on a funding deal which could see funding approved for the next two years. The deal does not include immigration proposals, leaving that issue up for debate at a later date.

The deal increases federal spending by hundreds of billions of dollars for various areas, including defence programs.

It marks the end of strict budget caps which were set in 2011 to reduce the federal deficit and allows Congress to spend billions more in the next two years.

Republican Mitch McConnell, the Senate majority leader, said the deal, which still needs to pass the Senate and House of Representatives before going to President Donald Trump for his signature, "is the product of extensive negotiations among congressional leaders and the White House."

Chuck Schumer, the Democratic Senate minority leader, said: "I'm pleased to announce that we have reached a two-year deal to lift the spending caps for defense and urgent domestic priorities far above current spending levels.

"While president threatens shut downs and stalemates, congressional leaders have done the hard work of finding compromises and consensus. I believe we have reached a deal that neither side loves but that both can be proud of. That's compromise."