Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The U.S. Senate voted 64-35 early Friday to approve a bipartisan two-year budget deal intended to end years of gridlock and frequent threats of government shutdowns.

The bill will now head to President Barack Obama, who is expected to sign the agreement hashed out between the White House and congressional leaders.

The Bipartisan Budget Act of 2015 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.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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.

The bill drew criticism from the majority of Republicans for giving up too much to Democrats without getting enough reforms and cuts in return.

It also became a beacon for Republican Senators running for president who returned to Washington, D.C., from campaigning to voice their opposition to the bill.

Sen. Rand Paul publicly said in speeches and fundraising emails that he would be “filibustering” the deal when he came back to Capitol Hill. He gave three separate speeches totaling just over 1 hour and 22 minutes on the Senate floor.

Paul's speeches drew criticism from Sen. Amy Klobuchar (D-Minn.).

Senate &staff all here at 1:55 am so that Pres candidate Rand Paul can send tweet out telling fans to watch him on @cspan 2. — Amy Klobuchar (@amyklobuchar) October 30, 2015

Sen. Ted Cruz (R-Texas) cancelled campaign events and returned to Washington to speak out against the deal, telling NBC News as he left that he had returned “because this budget deal is a disaster, it's Republican leadership joining with Democrats to fund all of President Obama's big government priorities.”

Sen. Marco Rubio (R-Fla.) also made an appearance on the Senate floor, voting against the budget measure but not giving a speech. Rubio had not voted since October 20, and before today had missed 18 of 19 votes the Senate had taken in the month of October.

The bill was also seen as a lifeline to newly-minted Speaker Paul Ryan (R-Wis.), as it pushes many of the fiscal fights that have stymied Congressional action until 2017. House Speaker John Boehner (R-Ohio) told reporters on Tuesday that the budget deal was an effort to “clean out the barn” for Ryan so he could focus on policy issues other than fiscal fights and threats of shutdowns.