London Underground has been handed a hefty fine over an out-of-control train that a judge said could have caused a “terrible tragedy”.

The maintenance train hurtled through seven Tube stops including Archway and Tufnell Park and could have collided with a passenger service.

It came within 600 metres of a packed Tube that was told to speed out of Archway to outrun the 39-tonnes engineering vehicle on Friday August 13, 2010.

London Underground and Tube Lines, which are both owned by Transport for London, and German firm Schweerbau GMBH were fined £100,000 each.

All three pleaded guilty to endangering passengers and staff under health and safety law at the Old Bailey yesterday.

The runaway train, a rail grinding unit, had previously broken down only a month before the incident.

Judge Richard Hone told the court: “There was the potential of terrible tragedy.”

He said the train was out of control for four miles during 16 minutes.

“To those involved it must have seemed an extremely frightening eternity,” he added.

Jonathan Ashley-Norman, prosecuting for the Office of Rail Regulation, said: “It could have led to tragedy, but thanks to the immediate actions of LU staff, no one was hurt.”

Problems started when the train broke down near Archway. A passenger train was called in to tow it away, but the coupler failed and it began rolling downhill, with no brakes.

Speeds of 30mph were reached as it raced after the passenger train, which was told to keep going and not stop while its passengers were told to run to the front carriages, the Old Bailey heard.

Control staff watched helplessly as they saw the flashing lights of both vehicles turn into one on their monitors.

It eventually stopped at Warren Street when it reached an upward incline.

London Underground director Mike Strzelecki said: “This was clearly a serious incident and LU and Tube Lines acted quickly to investigate its causes and take action to ensure that the risk of such a rare incident recurring was minimised.

“Following the incident LU immediately put in place procedures to remove the engineering train and tow-bar from use on the railway. Since then LU and Tube Lines have put in place even tighter controls.”

He added: “LU staff’s swift actions meant that this incident was drawn to a safe conclusion. LU has an excellent and improving safety record, with more than 10 times fewer serious incidents on the Tube than in 2000.”