Image caption Members of Congress finished voting on the bill before the 4 July holiday recess

In a rare outbreak of bipartisan voting, the US Congress has passed a measure preventing student loan interest rates from doubling.

With a deadline looming, lawmakers passed the measure as part of a larger transportation bill.

The legislative amity comes amid an election year that has been riven by rancour between party lines.

Four months from elections, no party wanted blame for students facing higher loan repayments, correspondents say.

White House spokesman Jay Carney said President Barack Obama looked forward to signing the bill.

Interest rates on federally backed student loans for about seven million people were set to double on 1 July from 3.4% to 6.8%.

It would have added $1,000 (£637) to the average cost of a loan.

The Democratic-led Senate passed the measure by a 74-19 vote, just minutes after the Republican-run House approved it 373-52.

The bill also extended funding for highway projects, which had been due to expire on 30 June.

The measure cost $105bn (£67bn), funded partially through extending existing fees and taxes on petrol.

Sponsors of the bill said it had created or saved 2.8 million jobs.

Republicans dropped demands that the bill require approval of the Keystone XL oil pipeline as well as a block on federal regulation of toxic waste by coal-fired power plants.

Among Democratic concessions on the bill were some environmental protections and biking, safety and pedestrian programmes.