The U.S. House on Wednesday approved a two-year budget deal that would suspend the $18.1 trillion federal debt limit, increase spending and prevent a government shutdown in December.

The measure passed 266-167, with 79 Republicans and 187 Democrats joining together to send it through after an hour-long debate and last-minute push for votes. No Democrats voted against the bill, while 168 Republicans voted no.

The deal now heads to the Senate and must pass before the Nov. 3 deadline to lift the debt limit, or the federal government risks a default, reported USA Today. Republican Sen. Rand Paul of Kentucky promised Wednesday night during the third GOP debate that he will filibuster the deal.

The deal gives the government the authority to borrow freely through March 15, 2017, after a new Congress and president are in place. It would also increase federal spending by some $80 billion over the next two years, with money divided evenly between domestic and military programs.

Across-the-board mandatory spending cuts put in place by the 2011 Budget Control Act would be eased under the bill, giving lawmakers billions in extra cash to spend on federal programs. The agreement would also save money by implementing long-term reforms to the Social Security Disability Insurance program, according to CBS News.

The bill also lays out a plan to sell 58 million barrels of crude oil from emergency reserves along the Gulf Coast starting in fiscal 2018 until 2025 to help offset the spending increase.

The proposed sale would involve tapping into the Strategic Petroleum Reserve in Texas and Louisiana, which holds more than 695 million barrels of crude oil, and extracting more than 8 percent of the reserves. Oil sales would start in 2018 at a rate of 5 million barrels per year and rise to 10 million per year by 2023, according to Bloomberg.

House Speaker John Boehner, R-Ohio, negotiated the agreement with the White House and other congressional leaders as he prepares to leave office on Oct. 30, a fitting ending to his troublesome speakership.

The passage of the deal came just hours after House Republicans nominated Rep. Paul Ryan, R-Wisc., to be the next speaker of the House.

Ryan had criticized the secret negotiations that produced the deal, but announced his support for it on Wednesday.

"As with any budget agreement, this one has some good, some bad, and some ugly," Ryan said in a statement Wednesday. "What has been produced will go a long way toward relieving the uncertainty hanging over us," he said, according to USA Today. "It's time for us to turn the page on the last few years and get to work on a bold agenda that we can take to the American people."

However, the ultra-conservative Freedom Caucus announced Wednesday morning that its members would oppose the deal, calling it a "fiscal monstrosity" and an "affront to open, accountable, and limited government. It plunges our nation into debt to the tune of nearly $20 trillion, busts the spending caps enacted by Congress just a few years ago," notes Breitbart.