London Underground, Tube Lines Ltd and Schweerbau GMBH had pleaded guilty to endangering passengers and staff under Health and Safety law, after the 39-tonne maintenance wagon hurtled through seven stations before it could be stopped.
A train in front of it was told to keep going and not stop, while its passengers were told to run to the front carriages, the Old Bailey heard.
Judge Richard Hone said: "There was the potential of terrible tragedy."
He said the runaway train was out of control for four miles during 16 minutes.
"To those involved it must have seemed an extremely frightening eternity," he added.
More top news
Police were called to Kilburn High Road at 5.20pm after reports of a shooting.
In just 24 hours the offer was retweeted more than a thousand times on Twitter.
What a year it's been full of ups and down, turmoil and change and it seems events here in London have got the entire nation talking.