The House passed a bill Tuesday that delays for three to five years the mandate for railroads to put long-sought safety technology in place.

Federal accident investigators say the technology, known as positive train control, would have prevented an Amtrak derailment in Philadelphia last May that killed eight people and injured about 200 others had it been working. Amtrak had installed the technology on tracks were the crash occurred, but it hadn't been tested yet and so wasn't turned on.

The bill was passed by a voice vote with little debate. Railroads and companies that ship freight by rail have been lobbying Congress heavily for a delay. Under the bill, railroads would have until Dec. 31, 2018, to install positive train control, and could seek a waiver for up to another two years if needed.

The bill also extends the government's authority to spend money on highway programs through Nov. 20 in an effort to buy time for Congress to pass a long-term transportation bill. Current authority is due to expire on Thursday.

Senate action is still required.

The safety technology relies on GPS, wireless radio and computers to monitor train position and automatically slow or stop trains that are in danger of colliding or derailing due to excessive speed. A 2008 law gave railroads until the end of this year to implement the expensive technology on all tracks that carry passenger trains or are used by trains to haul liquids that turns into toxic gas if spilled.

Most railroads aren't expected to make the deadline. Many railroads were late getting started while they waited for the government to develop standards for the technology, and while they tried to decide which approach best-suited their needs.

Freight railroads often host commuter railroad operations on their tracks, and also frequently use the tracks of their competitors. Developing positive train-control systems that can be used by multiple railroads has added a layer of complexity to the effort. Railroads also ran into unanticipated difficulties acquiring the radio spectrum necessary to make the technology work and getting government permission to erect thousands of antennas along tracks.

Railroads say they're worried about fines and liability should they violate the deadline. Freight railroads say they will stop hauling cargo like chlorine, which turns from liquid into toxic gas when exposed to the air, and prevent commuter trains and Amtrak from using their tracks if the deadline isn't delayed.

Failing to delay the deadline "will have devastating economic impacts," said Rep. Bill Shuster, chairman of the House Transportation and Infrastructure Committee and chief sponsor of the bill. "Not only will railroads stop shipping important chemicals critical to manufacturing, agriculture, clean drinking water and other industrial activities, but passenger and commuter rail transportation will virtually screech to a halt."

But some lawmakers say the delay should be shorter and determined on a case-by-case basis. "A three- or five-year, blanket extension will be interpreted by the industry as a waiver of the requirement and send the message that by failing to meet future deadlines, they can simply come to Congress for additional extensions," Rep. Adam Schiff, D-Calif., said in a letter to Shuster.

The National Transportation Safety Board has urged railroads to install positive train control or precursor train control technologies for more than four decades. The board has said that over that time it has investigated at least 145 PTC-preventable accidents in which about 300 people were killed and 6,700 injured.

The law mandating positive train control was passed in response to a 2008 collision between a Metrolink commuter train and a Union Pacific freight train in Chatsworth, California, that killed 25 people and injured 102 more. It was determined that a distracted Metrolink engineer continued past warning signals and onto a section of single track and into the path of the rushing freight train. Positive train control prevents trains from disobeying signals.