Harry Potter fans are risking death by wandering on to a railway line to take photographs of a viaduct used for scenes in the fantasy adventure films.
British Transport Police said incidents at the Glenfinnan Viaduct played a part in a 16% rise in railway trespassing offences in Scotland last year.
BTP has issued a fresh warning for people to stay away from the area of the West Highland Line.
In 2015, a family was among tourists who put themselves in danger.
The couple and their child were seen running on the railway line.
Tourists and photographers are also drawn to the viaduct because of its Highlands setting and due to a steam train, the Jacobite, that regularly runs on the line. The train also featured in the film franchise.
Five years ago, a steam train driver was forced to brake after spotting two older women standing dangerously close to the line.
The driver also reported narrowly missing a man who had been standing on the railway with a camera tripod in the same incident.
In its new warning, BTP said it understood the fascination with the viaduct because of Harry Potter, but “people do not have any magical powers so there is nothing to protect them from being injured or killed by a passing train”.
Inverness Station-based Sgt Kevin Lawrence said: “Tourists from all over the world travel on the Jacobite steam train during the summer months to visit the famous Glenfinnan Viaduct.
“Alarmingly, visitors often get off the train at Glenfinnan and walk back along the line to take photographs. This is extremely dangerous.
“The scenic, rural area also attracts many bikers and other tourists also travelling by road to see the viaduct.”
BTP said Network Rail had improved fencing in the area as well as signs directing people to safe vantage points.
Sgt Lawrence added: “Much as we love Harry Potter, I would like to remind everyone that we are mere Muggles, and if you trespass on the railway and are struck by a train, the consequences could be extremely serious and probably fatal.”
In the films, and the books by JK Rowling they are adapted from, a Muggle is a non-magical person.