A train driver has been injured after his locomotive struck a lorry on the Whitemoss level crossing between Gleneagles and Perth.
The engine was travelling from Grangemouth to Inverness when the accident happened at about 0645 GMT.
The engine driver had to be cut free, but his injuries are not life threatening. The lorry driver and his teenage son escaped injury.
The line between Dunblane and Perth reopened at 1624 GMT.
Network Rail said the train was a single engine locomotive with no wagons attached.
The truck, owned by Robert Neill of Dunning, was carrying wooden crates full of potatoes.
It is thought the lorry slid in the snow and ice as it was approaching the level crossing and then the driver could not get the vehicle free.
Moments later the single engine locomotive crashed into the lorry.
A spokesperson for Direct Rail Services, which operated the railway engine, said: "At approximately 0645 GMT this morning, a Direct Rail Services locomotive travelling northbound was reported to have struck a stationary vehicle at Whitemoss Level Crossing, near Aucthterarder.
"The single engine locomotive was on route to Inverness to facilitate a winter snow clearing operation for Network Rail.
Wooden crates and potatoes spilled from the lorry onto the tracks
"DRS's driver, who acted with great professionalism during the incident, was taken to hospital having sustained minor injuries."
The London to Inverness sleeper had been due about 15 minutes after the crash. The police said that they could have been dealing with multiple injuries if it had been involved in the collision.
The sleeper was stopped at Gleneagles and the 48 passengers were bussed to Inverness.
One passenger said: "We were alerted there was an accident about 0730 GMT and were told that we weren't the accident, so that was very lucky.
"We were given breakfast and hot drinks so I was very comfortable."
"It was organised and dealt with well."
Train services were disrupted for several hours while the accident was cleared up and investigated.
The road leading to the level crossing is expected to be closed for the next week while repairs are carried out.