Trains were halted on the Fort-William-Mallaig line today after a fire broke out beside the track at Glenfinnan.
Network Rail said the alarm was raised at 11:10am, 20 minutes after the Jacobite steam train had passed the location.
The route was closed at noon with disruption expected until 5pm.
Some trains were replaced by coaches, with services running again by mid-afternoon.
The Scottish Fire and Rescue Service said firefighters and four appliances had tackled a blaze covering 50 acres, which was brought under control within hours.
West Coast Railways, which operates the weekday steam service, was unable to say whether the train had been involved.
A spokesman said: "We take this very seriously and have been taking additional precautions, which have included patrols following the train."
The route, including the Glenfinnan Viaduct, featured in the Harry Potter film series.
The fire comes a day after a wildfire closed the A7 south of Galashiels for four hours.
It was at least the eighth significant incident in the last week, with others including near Pitlochry, Lochinver and North Kessock.