The legislation, which also revamps highway and transit programs and shores up the federal flood insurance program, now goes to the White House for President Barack Obama's signatures.
Lawmakers trying to leave town for a weeklong Fourth of July recess had been facing twin deadlines: Federal highway and transit aid programs and the government's authority to levy federal fuel taxes were expiring Saturday. And interest rates on new student loans were set to double on Sunday.
The burst of legislating came just four months before the November elections, giving lawmakers achievements to show off to voters who have increasingly held Congress in low esteem while the economy continues to flounder.
"We have a bill that will boost this economy. We have a bill that is supported by conservatives and liberals, progressives and moderates. I think it's a great day," said Sen. Barbara Boxer, D-Calif., who led Senate negotiations on the transportation portion of the package.
Boxer estimated the bill would save about 1.8 million jobs by keeping aid for highway and transit construction flowing to states and create another 1 million jobs by using federal loan guarantees to leverage private sector investment in infrastructure projects.
Rep. John Mica, R-Fla., chairman of the Transportation and Infrastructure Committee, said: "Probably millions would have been put out of work if we hadn't acted."
Not all lawmakers were happy.
"At least it's not as bad as our Republican colleagues wanted," complained Rep. Earl Blumenauer, D-Ore., who has championed bike and pedestrian programs that the measure would squeeze. "But make no mistake, it is not a bill to be proud of."
In the bargaining that led up to an agreement on the package earlier this week, House Republicans gave up their demands that the bill require approval of the contentious Keystone XL oil pipeline and block federal regulation of toxic waste generated by coal-fired power plants. Democrats gave ground on environmental protections and biking, pedestrian and safety programs.
The bill consolidates various transportation programs and reduces the number of programs by two-thirds. States would have more flexibility on how they spend transportation aid. It also revamps rules on environmental studies of the potential impact of highway projects, with an aim toward cutting in half the time it takes to complete construction projects. And the measure contains an array of safety initiatives, including requirements that would make it more likely passengers would survive a tour bus crash.
"It doesn't have everything," Mica said. But "we were able to do more with less and move transportation for the nation forward."
The bill would spend about $100 billion on federal highway programs over two years, but puts off the politically tricky decision on how to pay for them after that.
The federal 18.4 cent-a-gallon gasoline tax and 24.4 cent-a-gallon diesel tax are no longer enough to pay for current spending on highway and transit programs. And two commissions and an array of private sector experts have said the U.S. should be spending about twice as much or more on its transportation infrastructure as it does now.
But Congress and the White House have refused to discuss raising fuel taxes or an alternative long-term source of money. The federal trust funds that pay for highway and transit programs are forecast to be nearly broke by the time the bill expires.
"When the bill expires we face a high cliff from which the program could fall," said Erich Zimmerman, a policy analyst with Taxpayers for Common Sense.
The fuel taxes are not indexed for inflation and haven't been increased since 1993, so their buying power has steadily eroded. Also, cars and trucks today are more fuel-efficient and the number of miles driven has flattened, resulting in less gas tax revenue. Since 2008, Congress has three times dipped into the national general treasury to borrow a total of $34.5 billion to keep transportation programs going.
Congressional bargainers reached an agreement earlier this week on the $6 billion college loan portion of the bill that would avert a doubling of interest rates beginning Sunday on federal loans to 7.4 million students. The current 3.4 percent interest rate on subsidized Stafford loans would balloon back to 6.8 percent on Sunday under a cost-saving maneuver contained in a 2007 law.
About $20 billion of the measure's cost is paid for by making changes in companies' pension calculations that will reduce their tax deductions, and increasing the payments businesses must make to insure their pension programs.
The bill also extends the federal flood insurance program to protect 5.6 million households and businesses. It addresses a shortfall arising from claims after 2005's Hurricane Katrina by reducing insurance subsidies for vacation homes and allowing for increases in premiums.
The measure also requires that 80 percent of fines for violations of the Clean Water Act as a result of the 2010 Deepwater Horizon oil spill in the Gulf of Mexico will go to a trust fund for Gulf Coast states damaged by the spill.