Rail travellers have faced delays all day after a route out of London Euston was closed for several hours following a fire overnight.
Nearly 60 firefighters were called to tackle a blaze at a timber-yard in Harrow, forcing the rail line to close.
Routes from Euston to the Midlands, north of England, Scotland and North Wales were stopped to allow repairs.
Train services have been restored but customers have been warned to expect delays.
London Fire Brigade said the fire has been put out but Network Rail said disruption was likely to continue for the rest of the day.
Engineers had to repair a fire damaged wall near the affected line, which has been "made safe", Network Rail said.
Network Rail said the blaze had left a trackside retaining wall "in danger of collapse", which needed to be "dismantled, made safe and rebuilt".
While the wall was dismantled, all trains travelling between Euston and Milton Keynes were stopped.
- London Midland said they were trying to restore train services as quickly as possible
- Virgin Trains to and from Scotland, north-west England, the West Midlands and north Wales have severe delays
- Southern services between Milton Keynes Central, Watford Junction and Shepherds Bush have been cancelled. The line is expected to remain closed for the rest of the day.
- London Overground trains between Watford Junction and London Euston are experiencing severe delays
- A reduced overground service is running between Shepherds Bush and Clapham Junction
At the scene: Richard Westcott, Transport Correspondent
We're always quick to pile into Network Rail when they mess up, but credit where it is due, their engineers have got this line open much quicker than everyone expected and it wasn't an easy job.
They had to get specialist equipment on site, access the track and demolish a wall, before making the line safe again.
We were initially told it would take all-day but they were done and dusted by 13:00.
So the line is now open. Trains will doubtless be affected throughout the rest of the day, but it could have been a lot worse.
A regular shuttle service is operating between Milton Keynes, Northampton and Wolverton. A separate shuttle train service between Euston and Harrow and Wealdstone is being established.
A rail replacement bus service between Milton Keynes Central and Luton Airport Parkway is running for Virgin Trains customers.
Tickets for affected services are being accepted on: London Buses, Southeastern, Southern, Thameslink, East Coast, East Midlands, London Midland and TransPennine Express via any reasonable route.
Network Rail said: "Passengers wanting to travel on the West Coast main line and West London line are urged to check with their train operator or National Rail Enquiries before travelling as disruption and cancellations are to be expected throughout the day."
Emergency services were called to the site in Chantry Place, Harrow, at 23:47 on Thursday.
London Fire Brigade said a cordon was put in place at the warehouse fire and 12 local residents were evacuated amid fears that propane cylinders might explode.
Four firefighters remain at the scene "damping down pockets of fire", London Fire Brigade said. No injuries have been reported.
The cause of the fire is not yet known.