The U.S. Congress on Friday approved a measure freezing federally subsidized student loan rates for a year, averting a doubling of rates scheduled to occur Sunday and offering President Obama the opportunity to claim victory after a high-profile pressure campaign to persuade Congress to act.

Lawmakers agreed to the item as part of a larger measure that also includes funding for road and bridge construction, passing the package on the eve of a week-long recess for the July 4 holiday.

The House approved the measure on a 373-to-52 vote; it was approved in the Senate 74 to 19. It now heads to Obama for his signature.

“This legislation proves that when Republicans decide to work with Democrats, we can do a lot to move our economy forward,” Senate Majority Leader Harry M. Reid (D-Nev.) said in a statement.

With the measure’s passage, loan rates will remain 3.4 percent for another year, rather than rising to 6.8 percent. The change is estimated to help more than 7 million students, saving them an average of $1,000 each on their loans.

Obama had made the need for congressional action a centerpiece of a stump speech delivered on college campuses and elsewhere across the country, suggesting that Republicans were obstructing a loan freeze that could benefit middle-income families.

In fact, Republican leaders had indicated weeks ago that they, too, favored halting the rise in rates. The parties had been arguing how to pay the $6 billion price tag, and the GOP accused Obama of campaigning on the issue but failing to work to negotiate a solution.

In the end, Senate leaders negotiated a break to the impasse, agreeing to pay for the item by raising premiums for federal pension insurance.

Their hope was to assuage concerns from the business community over the price hike with a separate item that will change rules for calculating pension liabilities, lowering costs for businesses. Still, some companies are likely to object to the premium increase.

Also, eligibility for a federally subsidized loan will now be capped to 150 percent of the length of a college program. So, students enrolled in a four-year program will be able to receive loans for only six years.

This story has been updated.

Share your thoughts in the comments section below.

More from PostPolitics:

Health-care ruling vindicates Donald Verrilli

Which Democrats voted to hold Eric Holder in contempt?

Energy ads flood TV in swing states