After weeks of wrangling, the Senate finally passed a student loan deal Wednesday night in an 81-18 vote, overcoming liberal opponents who argued that the bill would fill government coffers by burdening students with high-interest payments in the future.

The bill pegs the interest rates on federal student loans to the long-term interest rate for federal borrowing, while reducing the deficit by an estimated $715 million over 10 years–a key Republican demand. As the market rate is extremely low right now, the deal would lower borrowing costs for students in the short term. All undergraduates taking out Stafford loans would see their rate lowered from 6.8% to 3.86% for the current year.

In contrast to recent short-term fixes, which have left student borrowers in limbo, the bill would permanently change the way the federal government calculates student borrowing rates. The legislation would also address the immediate outcry over the sudden spike in interest rates for subsidized Stafford loan borrowers, which doubled on July 1 from 3.4% to 6.8%.

“This compromise is a major victory for our nation’s students,” President Obama said in a statement after the Senate bill passed. “It meets the key principles I laid out from the start: it locks in low rates next year, and it doesn’t overcharge students to pay down the deficit.”

However, since the rate for 10-year Treasuries is currently at a historic low, everyone expects that that it will rise in the years to come–a major concern for the liberal Democrats who broke from leadership to vote against the deal.

By fiscal year 2017, the borrowing rate for undergraduates will be 6.95%, based on the Congressional Budget Office’s estimate for the 10-year Treasury rate. That’s even higher than the current 6.8% student borrowing rate that both parties have deemed unacceptable. The student borrowing rate will continue to rise from there–reaching 7.25% in 2018–though it can’t go any higher than 8.25% for undergraduates, 9.5% for graduates, and 10.5% for parents, due to the bill’s interest-rate caps:

For 17 liberal senators–16 Democrats and independent Bernie Sanders–that’s too much to ask of students, and it’s not worth saving the government money over it. One lone Republican, Sen. Mike Lee (R-Utah), also voted against the bill. (There’s a full list of the votes here.)

“I cannot support a plan that asks tomorrow’s students to pay drastically more in order to finance lower rates today,” Sen. Elizabeth Warren (D-Mass.) said on the Senate floor on Wednesday. “And I cannot support a plan that raises interest rates on students in the long term while the government continues to make a profit off of them.”

But the bill passed with the critical support of Sen. Tom Harkin (D-Iowa), chair of the Senate’s Health, Education,

and Labor Committee, and Senate Majority Leader Harry Reid, who spent weeks struggling to find a compromise that kept rates low enough to please Democrats while reducing the deficit to pass muster with Republicans.

The House is expected to act quickly to pass the bill, which House Education chair John Kline (R-Minn) called “a victory for students and taxpayers.”