Seven years ago, in the face of growing evidence that the American rail system was dangerously vulnerable to derailments and collisions, Congress passed a law requiring that railroad companies add to their tracks new technology designed to limit such accidents. Absent such technology, federal transportation authorities said last year, “everybody on a train is one human error away from an accident.”

In the years that followed, some sections of the rails threading the crowded Northeast Corridor gained the so-called Positive Train Control (PTC) technology. But in late March, a Senate committee approved a bipartisan bill to delay by an additional five years the requirement for the new technology. Among the sections of the system that were then still without the safety gear: the tracks stretching between New York City and Washington.

As investigators on Wednesday continued to sift through the wreckage of an Amtrak train in Philadelphia, seeking to understand how the cars derailed in an accident that took the lives of at least seven people, the cause of the tragedy remained undetermined. But a look at recent legislative history reveals that Congress, only weeks ago, moved to loosen a safety rule that was designed to prevent the sort of disaster that just unfolded. On Wednesday afternoon, a National Transportation Safety Board official said that had the PTC technology been installed on the track, the accident in Philadelphia "would not have occurred."

The Amtrak train that derailed was traveling near a notorious curve where cargo and commuter lines come together. The freight rail industry has for years lobbied to limit requirements that it add the safety gear to its tracks, complaining that the mandate was expensive and offered too short a time frame for implementation.

The chief sponsor of the bipartisan bill delaying the safety technology mandate, Missouri Republican Sen. Roy Blunt, has accepted more than $290,000 in campaign contributions from the railroad industry during his career -- the fifth-highest tally in the Senate, according to data compiled by the Center for Responsive Politics (CRP), a campaign finance watchdog group. The Association of American Railroads -- which counts private railroad companies and Amtrak as members -- backed Blunt’s legislation to delay the mandate.

In response to IBTimes questions about the PTC legislation, Blunt's office forwarded a statement from the senator saying: "We’re in the process of marking up a passenger rail bill and I’m sure one of the things we’ll be wanting to look at as we address the bill is what happened with that accident, why it happened and what you need to do to do our best to see that it doesn’t happen again." When he introduced the legislation, Blunt presented it as an effort to find a balance between the industry’s competitive position and safety interests. “We must work to do everything we can to improve train safety and accident prevention without burdening our nation’s freight and passenger rail industry,” he said in a statement.

The original 2008 law, the Rail Safety Improvement Act, came in response to a series of deadly rail accidents -- the most prominent being a 2008 California collision between a commuter train and freight train that killed 25 people and injured 135. Federal regulators touted requirements that rail companies install the PTC technology as a crucial upgrade, one that would limit “train-to-train collisions, overspeed derailments, incursions into established work zone limits, and the movement of a train.”

Three years later, in 2011, the Obama administration effectively reduced the scope of the law, limiting the number of tracks that had to install the new technology. In 2012, California Sens. Dianne Feinstein and Barbara Boxer, both Democrats, sent a letter to the Federal Railroad Administration saying they were “concerned by reports that the current pace of progress and investment [in installing PTC technology] is insufficient.”

Just weeks ago, the Senate Committee on Commerce, Science and Transportation sought to further loosen safety standards, dismissing objections from advocacy groups representing railroad workers. The bill the committee passed proposes to delay the rule mandating PTC technology by five years.

On Wednesday, less than 24 hours after the disaster in Philadelphia, the House of Representatives voted to preserve planned cuts to Amtrak’s budget.

Tuesday’s disaster follows a series of high-profile train accidents that have unfolded across the American rail system. In January, one person was killed in Washington, D.C., when a Metro station filled with smoke. A month later, a Metro-North Railroad train near New York City collided with a sport utility vehicle, killing six people. Three trains carrying petroleum have derailed in recent months.

Commuter and cargo train transportation has increased in recent years, but funding for infrastructure maintenance has not. According to data compiled by ThinkProgress, Congress has decreased its funding for Amtrak from over $1.5 billion in 2009 to roughly $1.1 billion in the latest spending bill offered by House Republicans. Meanwhile, the oil industry has lately been pushing in court to weaken federal rules designed to prevent train explosions.

While rail is an increasingly safe way to travel, it is more dangerous to travel by train in the United States than in other industrialized nations. A study published in March by the American Enterprise Institute found that the rate of injury per mile traveled on a train is far higher in the U.S. than in Europe. It is “safe to conclude that America’s is among the worst rail systems in the developed world,” the conservative think tank wrote.

Federal regulators and civil engineers have issued warnings about the safety of the nation’s rail system for the past two decades.

A 1993 report from the Government Accountability Office found that Amtrak’s maintenance procedures did not adequately guarantee federally mandated safety standards. At times, GAO said, those safety procedures where wholly “disregarded when parts were not available or there was insufficient time for repairs.” In 2009, a report from the Federal Railroad Administration’s inspector general raised concerns about track inspectors’ oversight of the nation’s railways.

In 2014, the American Society of Civil Engineers’ annual report on Pennsylvania -- where Tuesday’s derailment occurred -- found that “approximately 60 percent of the short line and regional railroad physical infrastructure is in need of extensive rehabilitation.” That same year, the National Transportation Safety Board said trains carrying oil and other hazardous material should be rerouted away from major population centers.

For Americans, safety issues for commuter and cargo transportation are intertwined because in the U.S., commuter trains often travel on freight lines. The result is that Amtrak “relies on freight rail lines that make maintenance and upgrade decisions on the basis of their own business models and shareholders’ interests,” according to the American Society of Civil Engineers.

Since 2009, the railroad industry has spent more than $260 million lobbying Congress, according to the Center for Responsive Politics. One example: CSX, the owner of an oil train that exploded in West Virginia in February, has spent more than $25 million on congressional lobbying in the past six years, focusing on bills dealing with safety issues. CSX has lobbied against “bills that would give the federal government more power of oversight and regulation,” according to CRP.

The National Transportation Safety Board says that since 2004, it has investigated 25 fatal train accidents that could have been “prevented or mitigated” with Positive Train Control technology.