WASHINGTON - The Senate and House approved a sweeping transportation bill Thursday that could help increase the compensation to victims of the May 12 Amtrak crash in Philadelphia and boost funding for rail safety - both steps coming in response to the derailment that killed eight people.

The five-year, $305 billion bill includes policy provisions related to highway safety, railroads, and road programs. Several policy riders, though, including one to reauthorize the Export-Import Bank, drew criticism, and some faulted the bill for being funded with gimmicks.

But it passed overwhelmingly, and President Obama will sign it, his spokesman has said.

One piece would alter a federal law limiting how much railroads can be forced in court to pay the people hurt and families of those killed in rail accidents. The liability cap would rise to $295 million, up from $200 million - an amount that personal-injury lawyers said would not cover the damages from the devastating Philadelphia wreck.

Without the change, the lawyers said, the people suing Amtrak could be forced to accept less than they would normally have received.

The bill also includes $199 million to help commuter railroads install Positive Train Control, a system that transportation experts have said could have prevented the Philadelphia crash. The system can slow or stop speeding trains, but scant progress has been made installing it across the country.

Commuter railroads have said they have been hampered by tight budgets. The money in the bill marks the first time the federal government has set money aside specifically for PTC, though it will only cover a fraction of the total cost, expected to top $12 billion.

The bill also requires passenger railroads to install cameras to monitor crews, a step that could have helped investigators trying to figure out why Amtrak Train 188 was traveling far over the speed limit when it derailed in Philadelphia.

The measure was approved 359-65 in the House and 83-16 in the Senate.

jtamari@phillynews.com @JonathanTamari