FLYING Scotsman enthusiasts are being urged to keep off the tracks when the iconic steam loco visits York on Saturday afternoon.

Network Rail says recent tours elsewhere have led to 'dangerous and illegal' behaviour by fans.

"Photographs shared online showed crowds of people, including young children, illegally trespassing on the tracks and stood in the path of oncoming trains," said a spokeswoman.

"Trespass on the railway is a criminal offence with up to a £1,000 fine. Train obstruction is also against the law with a penalty of up to two years in prison."

Vicki Beadle, Operations Risk Advisor for Network Rail, said: “We want people to have a fantastic time this weekend, but we can’t stress enough how important it is to keep safe at the same time.

“Trespassing on or near the tracks is incredibly dangerous, as well as being illegal and we work closely with British Transport Police to tackle this.

"There is never an excuse to trespass on the railway and this type of behaviour can have devastating life-changing and even fatal consequences.”

Chief Inspector Gareth Davies, from 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.”