Federal investigators are still looking at how CSX railway crews routed an Amtrak train into a parked freight train in Cayce, South Carolina, last weekend. But even if CSX should bear sole responsibility for the accident, Amtrak will likely end up paying crash victims' legal claims with public money.

Amtrak pays for accidents it didn't cause because of secretive agreements negotiated between the passenger rail company, which receives more than $1 billion annually in federal subsidies, and the private railroads, which own 97 percent of the tracks on which Amtrak travels.

Both Amtrak and freight railroads that own the tracks fight to keep those contracts secret in legal proceedings. But whatever the precise legal language, plaintiffs' lawyers and former Amtrak officials say Amtrak generally bears the full cost of damages to its trains, passengers, employees and other crash victims — even in instances where crashes occurred as the result of a freight rail company's negligence or misconduct.

Railroad industry advocates say that freight railways have ample incentive to keep their tracks safe for their employees, customers and investors. But the Surface Transportation Board and even some federal courts have long concluded that allowing railroads to escape liability for gross negligence is bad public policy.

"The freight railroads don't have an iron in the fire when it comes to making the safety improvements necessary to protect members of the public," said Bob Pottroff, a Manhattan, Kansas, rail injury attorney who has sued CSX on behalf of an injured passenger from the Cayce crash. "They're not paying the damages."

Beyond CSX's specific activities in the hours before the accident, the company's safety record has deteriorated in recent years, according to a standard metric provided by the Federal Railroad Administration. Since 2013, CSX's rate of major accidents per million miles traveled has jumped by more than half, from 2 to 3.08 — significantly worse than the industry average. And rail passenger advocates raised concerns after the CSX CEO at the time pushed hard last year to route freight more directly by altering its routes.

CSX denied that safety had slipped at the company, blaming the change in the major accident index on a reduction of total miles traveled combined with changes in its cargo and train length.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Our goal remains zero accidents," CSX spokesman Bryan Tucker wrote in a statement provided to The Associated Press. CSX's new system of train routing "will create a safer, more efficient railroad resulting in a better service product for our customers," he wrote.

Related: Lack of Positive Train Control haunts another deadly collision

Amtrak's ability to offer national rail service is governed by separately negotiated track usage agreements with 30 different railroads. All the deals share a common trait: They're "no fault," according to a September 2017 presentation delivered by Amtrak executive Jim Blair as part of a Federal Highway Administration seminar.

No fault means Amtrak takes full responsibility for its property and passengers and the injuries of anyone hit by a train. The "host railroad" that operates the tracks must only be responsible for its property and employees. Blair called the decades-long arrangement "a good way for Amtrak and the host partners to work together to get things resolved quickly and not fight over issues of responsibility."

Amtrak declined to comment on Blair's presentation. But Amtrak's history of not pursuing liability claims against freight railroads doesn't fit well with federal officials and courts' past declarations that the railroads should be held accountable for gross negligence and willful misconduct.

After a 1987 crash in Chase, Maryland, in which a Conrail train crew smoked marijuana then drove a train with disabled safety features past multiple stop signals and into an Amtrak train — killing 16 — a federal judge ruled that forcing Amtrak to take financial responsibility for "reckless, wanton, willful, or grossly negligent acts by Conrail" was contrary to good public policy.

Related: Brother of Amtrak employee who died said sibling worried about safety

Conrail paid. But instead of taking on more responsibility going forward, railroads went in the opposite direction, recalls a former Amtrak board member who spoke to the AP. After Conrail was held responsible in the Chase crash, he said, Amtrak got "a lot of threats from the other railroads."

The former board member requested anonymity because he said that Amtrak's internal legal discussions were supposed to remain confidential and he did not wish to harm his own business relationships by airing a contentious issue.

Because Amtrak operates on the freight railroads' tracks and relies on the railroads' dispatchers to get passenger trains to their destinations on time, Amtrak executives concluded they couldn't afford to pick a fight, the former Amtrak board member said.

"The law says that Amtrak is guaranteed access" to freights' tracks, he said. "But it's up to the goodwill of the railroad as to whether they'll put you ahead or behind a long freight train."

A 2004 New York Times series on train crossing safety drew attention to avoidable accidents at railroad crossings and involving passenger trains — and to railroads' ability to shirk financial responsibility for passenger accidents. In the wake of the reporting, the Surface Transportation Board ruled that railroads "cannot be indemnified for its own gross negligence, recklessness, willful or wanton misconduct," according to a 2010 letter by then-Surface Transportation Board chairman Dan Elliott to members of Congress.

That ruling gives Amtrak grounds to pursue gross negligence claims against freight railroads — if it wanted to.

"If Amtrak felt that if they didn't want to pay, they'd have to litigate it," said Elliott, now an attorney at Conner & Winters.

The AP was unable to find an instance where the railroad has brought such a claim against a freight railroad since the 1987 Chase, Maryland, disaster. The AP also asked Amtrak, CSX and the Association of American Railroads to identify any example within the last decade of a railroad contributing to a settlement or judgment in a passenger rail accident that occurred on its track. All entities declined to provide such an example.