A company has been fined £6.5m after an 11-year-old boy was electrocuted at a rail depot, a regulator said.
Harrison Ballantyne died in June 2017, after entering Daventry International Rail Freight Terminal to retrieve a football.
The Office of Rail and Road (ORR) said depot operator, W H Malcolm Limited, was found guilty of health and safety failings at Northampton Crown Court.
A ORR spokesman said it was an "entirely avoidable tragedy"
Harrison Ballantyne, from Crick, climbed on top of a stationary freight wagon at the Northamptonshire depot and received a fatal electric shock from an overhead line.
He was pronounced dead at the scene.
W H Malcom had denied two health and safety offences relating to the protection of members of the public on their site and was sentenced on Friday after being found guilty at trial.
The ORR said the court heard the company had failed to assess the risk of unauthorised access to the depot.
ORR chief inspector of railways Ian Prosser said: "It is only right that WH Malcolm are held to account for failing to prevent unauthorised access and for failing to manage the risks in what should have been an entirely avoidable tragedy.
"The railway industry has done some excellent work in preventing trespass and educating children about the risks, but this case serves as a reminder that should access to the railway not be properly controlled, serious events like this occur."