Scotland is facing the prospect of further landslides and avalanches as temperatures continue to rise following an incident in which a passenger train was derailed by tonnes of mud.

The Mallaig to Glasgow train left the track on a remote stretch of line between Arisaig and Glenfinnan, near the famous viaduct that features in the Harry Potter movies.

The carriages remained upright and the five passengers on board were unhurt but the line will remain closed “until further notice”, with a replacement bus service operating between Mallaig and Fort William.

Tonnes of mud swept across the track from the bare hillside above, and a NetworkRail Scotland spokesman said engineers were assessing the site to determine the scale of the problem.

The unstable conditions have been blamed on a huge temperature swing, from the lowest figure recorded this winter, when it reached -13.5C in Dalwhinnie on Saturday, to the 10C expected in the central belt on Tuesday.

The avalanche risk is said to be “considerable” in the mountains, including the Ben Nevis area where searchers were continuing to look for a missing hillwalker.