Two firms have been fined a total of £13.5m for breaching health and safety regulations over the 2000 Hatfield train crash, in which four people died.
The crown court trial lasted eight months
Network Rail, formerly Railtrack, was fined £3.5m - the highest ever for a rail firm on health and safety grounds.
Maintenance firm Balfour Beatty was fined £10m. They were ordered to pay £300,000 each in costs.
The eight-month Old Bailey trial had heard the 117mph derailment was caused by a cracked section of the track.
The crash, involving the London to Leeds express train, also left 102 injured.
The £8m trial had heard a backlog of essential work had been allowed to accumulate, and the rail had been identified for repair 21 months earlier.
Balfour Beatty apologised for its role in the crash.
Garry Fellows, who was severely injured in the crash, said he hoped the money would be spent on improving the railways.
"I think that would only be some form of justice," he said.
Fining the firms, the judge had been particularly critical of the construction giant and its inspection regime, saying it simply was not effective.
Mr Justice Mackay said in his 30 years in the legal profession he regarded the company's failure as the "worst example of sustained industrial negligence in a high-risk industry he had ever seen".
It was disclosed the track was checked from an inadequate vantage point and so inspectors were unable to see faults.
The judge called it an "indefensible practice".
Commenting on the smaller £3.5m fine for Network Rail, he said: "Every pound spent on a fine can't be spent on rail safety."
Balfour Beatty and five rail executives had also faced charges of corporate manslaughter but were formally cleared by the judge due to lack of evidence.
On Tuesday, prosecutors dropped the case against four Balfour Beatty workers still facing charges over the crash.
'Tragedy for all'
Responding to its fine, Balfour Beatty said: "Hatfield was a tragedy and our thoughts remain with the bereaved families and with those injured and otherwise affected by it."
By entering a guilty plea, the company said, it had accepted inadequacies in its patrolling and inspection activities, "for which it apologises".
"It is, however, clear that the accident arose as a result of a systemic failure of the industry as a whole."
Chairman of Network Rail Ian McAllister said: "The Hatfield accident was a tragedy for all concerned. And no amount of fine can offset the hurt and distress caused to the relatives of those who died and also to the injured.
"But I also think you have to remember that the railways since then have changed fundamentally."
He said maintenance had been brought in house and new technology introduced which had "changed the mentality of the industry away from find and fix to one of predict and prevent".
"And the reason we have done that is in order to reduce the risk of an incident like Hatfield ever happening again," he added. "And we believe we have minimised that risk."
The train operator GNER, whose train was involved in the crash, said that it would not be making any comment.
The severity of the fines imposed on the two companies were welcomed by the Safe Trains Action Group (Stag).
Stag vice chairman Carol Bell said: "We have said that there have to be bigger, swingeing fines for companies and it's good to see that there have been in this case.
"The size of these fines sends a message to companies that they must take full regard of safety."