After years of gridlock and frequent threats of government shutdowns over funding levels, the House of Representatives on Wednesday passed a two-year bipartisan budget deal cut between congressional leadership and the White House.

Seventy-eight Republicans joined every House Democrat in passing the Bipartisan Budget Act of 2015, which extends the nation’s debt limit through 2017 and also sets spending levels through September of that year. It also raises the spending caps set in place in 2011 providing for $80 billion in sequester relief.

The final vote was 266 to 166.

This bill now needs to make its way through the Senate, where Senate Majority Leader Mitch McConnell has vowed to take it up before the November 3rd debt limit deadline next week.

The bipartisan agreement also includes long-term entitlement reforms to the Social Security Disability Insurance (SSDI) program — the first major reform to Social Security since 1983 – and prevents a spike in Medicare B premiums for millions of seniors.

Close video Rep. Paul Ryan to support budget deal Republican Rep. Sean Duffy of Wisconsin joins Thomas Roberts in the moments before Rep. Paul Ryan was nominated for House Speaker – also discussing challenges he may face in leadership. NBC’s Luke Russert also joins to discuss. Republican Rep. Sean Duffy of Wisconsin joins Thomas Roberts in the moments before Rep. Paul Ryan was nominated for House Speaker – also discussing challenges he may face in leadership. NBC’s Luke Russert also joins to discuss. share tweet email Embed

Aides say the agreement is a byproduct of bipartisan negotiations with the White House, which have been ongoing since September 17th.

Outgoing Speaker of the House John Boehner - who was instrumental in cutting the deal with President Barack Obama - left this two year fiscal “gift” to his likely successor Rep. Paul Ryan (R-Wisc.).

“I didn’t want him to walk into a dirty barn full of you know what. So I have done my best to try and clean it up,” Boehner told reporters Tuesday.

Ryan, the current chairman of the powerful House Ways and Means Committee and co-author of the 2013 budget deal, ultimately supported the bipartisan budget bill despite his criticism of the negotiations that brought it about.

“There is no doubt that a better process would have produced a better result. If I’m elected Speaker, we will begin a conversation about how to approach these big issues - as a team - long before we reach these kinds of deadlines,” Ryan said in a statement released, noting that his vote is based on “the substance of the bill.”

“What has been produced will go a long way toward relieving the uncertainty hanging over us, and that’s why I intend to support it,” he said.

This article first appeared at NBCNews.com