Trainspotters have been issued a behaviour warning ahead of a visit by one of Britain's best loved engines to Lancashire.
Network Rail issued a safety alert after dangerous and illegal behaviour on the railway during recent Flying Scotsman visits elsewhere in the country.
The famous train is due to travel through Lancashire next month, an a event which is expected to attract crowds of fans.
Earlier this year, photographs shared online showed crowds of people, including young children, illegally trespassing on the railway, stood in the path of oncoming trains.
People have also been using selfie sticks while trying to take photographs putting them at risk of electrocution from overhead electric cables which power trains with 25,000 volts.
There have also been cases of unauthorised and dangerous drone flying, which is illegal on, over or within 50 metres of the railway.
The much-loved steam engine will travel on the West Coast Main Line from Crewe to Carnforth on July 20, and from Crewe to Carlisle on August 3.
Police will also employ special tactics to catch thoughtless lawbreakers - with officers on board the train and cameras on the front of Flying Scotsman to film anyone trespassing during the West Coast main line journeys.
David Golding, Network Rail's acting route managing director, said: “It’s great that people want to come and see Flying Scotsman but it’s vital for them to stay safe. The railway is an extremely dangerous environment if people misuse it. It’s full of both obvious and hidden dangers, which carry risks of catastrophic injuries or even death.
“It is never acceptable to go onto the track for any reason. Flying Scotsman is not the only train running on the railway - other trains will be travelling at speeds of up to 125mph. Come and enjoy the spectacle of this iconic train, but please do that from a safe place.”
Inspector Becky Warren, of British Transport Police, said: “Seeing the Flying Scotsman is an exciting event for many people and we want everyone to be able to have a great day out.
“Our priority is the safety of everyone viewing and travelling on the train, and our officers will be along the route and at stations to ensure everyone can enjoy the event without putting themselves or others in danger.
“Please remember to use safe vantage points to view and take pictures of the train, stay clear of the line, and do not risk serious injury or death by trespassing on the tracks.
“It is important to remember that the railway is an extremely hazardous environment and those caught trespassing or obstructing trains can expect to be prosecuted.”
Trespass on the railway is a criminal offence with up to a £1000 fine. Train obstruction is punishable by up to two years in prison. Those prosecuted for dangerous or unauthorised drone use face a fine of up to £2,500.
Network Rail, British Transport Police and train operating companies will have extra staff at stations on July 20 and August 3.