Rush-hour commuters suffered major disruption as no trains were able to operate between Milton Keynes and London Euston due to a fire.
More than 50 firefighters were sent to tackle the blaze at a timber yard in Harrow, north-west London.
Disruption to rail services on the West Coast Main Line was expected to continue throughout Friday.
A Network Rail spokeswoman said: “A fire overnight at a timber yard in Harrow has damaged a trackside retaining wall.
“It will need to be dismantled, made safe and rebuilt.
“This is a big job expected to take all day.
“The West Coast Main Line will remain shut between Euston and Milton Keynes while these repairs are made.
“Passengers wanting to travel on the West Coast Main Line and West London Line are urged to check with their train operator or nationalrail.co.uk before travelling.
“They will be diverted on alternative routes.”
Virgin Trains has lifted ticket restrictions meaning passengers can use services on alternative routes or travel on Saturday.
• READ MORE: 40-year-old train destined for ScotRail catches fire
A spokesman said: “We are sorry for the inevitable disruption and delays to journeys.”
Dozens of concerned residents called 999 after spotting the flames and huge plumes of smoke at Chantry Place, Harrow.
Social media users reported hearing explosions and London Fire Brigade said 12 people had been evacuated from nearby homes “as a precaution”.
Station manager Jason Jones said: “We have got a very well developed fire which is extremely visible from quite a way out.
“There are propane cylinders involved so a hazard zone has been set up as cylinders can explode when exposed to heat.
“The site is next to Headstone Lane train station and trains have been stopped.
“Crews are working hard to bring the fire under control.”
A total of eight fire engines and 58 firefighters were sent to the scene after more than 30 emergency calls were received just before midnight on Thursday.
A cordon was put in place on Headstone Lane.
Passengers on a London Midland service from London Euston to Milton Keynes were evacuated from a train at Headstone Lane.
The cause of the fire is not yet known.