East and west coast lines reopen
The west coast main line connecting Scotland and England has reopened again in both directions.
The line had closed twice in 24 hours after heavy rain caused flooding and problems with an overhead power line.
The east coast main line between Edinburgh and London also reopened on Friday afternoon following landslips.
On the west Highland line buses are replacing trains between Fort William and Glasgow after a freight train derailed.
The west coast line, which connects Glasgow and Edinburgh with England, had closed on Friday afternoon at Beattock between Lockerbie and Carstairs because of a fault with an overhead power line.
But Network Rail said at 17:30 that trains were on the move again, although services were subject to delays.
Weather and travel news
Latest updates and information
The rail line had also suffered severe disruption overnight into Friday morning, with a train delayed by flooding in Cumbria before later catching fire near Lockerbie.
Hundreds of people were stuck for up to 15 hours on the Virgin service from London to Glasgow.
The disruption resulted in long queues at Glasgow Central Station as people waited to travel south.
On the east coast line, an hourly service between London King's Cross and Edinburgh Waverley resumed on Friday afternoon despite earlier warnings it was likely to remain closed until Saturday.
Services had been suspended after heavy rain flooded various sections of the line and caused a landslip at Spittal, south of Berwick-upon-Tweed, which deposited more than 40 tonnes of earth onto the track and washed way embankments.
East Coast managing director Karen Boswell said: "We are pleased to confirm trains have resumed running between Newcastle and Edinburgh, though we do expect these services to be very busy.
"We appreciate that travel during the last 24 hours has been difficult for everyone, but anyone who has seen pictures of the damage caused by this exceptionally severe weather will understand the challenge involved in getting trains moving again."
Problems in the west Highlands, however, were taking longer to clear up following a freight train derailment near Tulloch, and a landslip at Arrochar.
The driver of the 24-wagon freight train, which left the tracks on the banks of Loch Treig, had to be airlifted to safety by an RAF helicopter. He was shaken but uninjured.
The line remained blocked between Fort William and Crianlarich and Crianlarich and Glasgow.
A ScotRail spokesman said: "We are doing everything we possibly can to help our customers and have extra staff on hand to help at stations.
"Customers are advised to get up-to-date journey information before travelling."