A company has been fined £6.5 million for safety failings after an 11-year-old boy was electrocuted at a rail depot, a regulator said.
Harrison Ballantyne died in June 2017 after gaining access to Daventry International Rail Freight Terminal in Northamptonshire to retrieve a football.
The boy climbed on top of a stationary freight wagon and received a fatal electric shock from an overhead line.
He was pronounced dead at the scene.
WH Malcolm Limited, operator of the depot, was sentenced to a £6.5 million fine at Northampton Crown Court on Friday after being found guilty of health and safety failings, the Office of Rail and Road (ORR) said.
It is one of the most severe punishments handed out following an ORR prosecution.
The court heard that the company failed to assess the risk of unauthorised access to the depot, according to the regulator.
The ORR's chief inspector of railways Ian Prosser said: "Our thoughts remain with Harrison's family and friends.
"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."