A SERIAL flasher from Musselburgh who was caught out after one of his young victims snapped him on her phone has been jailed.

Walter Allan exposed himself to two schoolgirl sisters as they holidayed with their parents in Edinburgh in August 2015.

Allan, 51, was seen on Portobello Promenade standing at the beach front, naked from the waist down, and exposing himself to the girls, aged nine and 14.

Allan, of Champigny Court, Musselburgh, also exposed himself to a third young girl on the same day while sitting next to her on a beach front wall.

But he was later identified after the third girl managed to catch an image of him on her mobile.

The flasher also admitted to exposing himself while leaning against a wall inside an Asda store in Stenhousemuir eight months later.

Allan was described as having “a horrific record” for sexual offending dating back more than 30 years when he appeared from custody at Edinburgh Sheriff Court on Thursday.

Sheriff Michael O’Grady QC jailed Allan for two years and placed him on the sex offenders' register for three years.

He will also be supervised for 12 months following his release from prison as part of the extended sentence.

Previously the court was told that the nine-year-old and the 14-year-old sisters were on holiday in the Capital with their parents when Allan struck.

The girls were walking ahead of their parents on the beach front at Portobello when they were targeted by Allan, who dropped his trousers in front of them and exposed himself at about 5pm on August 9, 2015.

Allan soon walked off but the quick-witted older girl sought out her parents and told them about the offence and that she had managed to take a picture of the man.

The court then heard that Allan was arrested after he was seen “muttering to himself” as he leaned against a wall and exposed himself to stunned shoppers inside the Asda store in April 2016. He was then connected to the previous incidents at Portobello.

During Thursday’s hearing, Joe Boyd, defending, said his client had “little recollection” of carrying out the acts due to “excessive drinking and the taking of legal highs” beforehand.

Sheriff O’Grady told Allan: “You have a horrific record for this kind of sexual offending. It is absolutely clear to me that a custodial sentence is inevitable.

“You have taken no responsibility and have no intention of addressing your behaviour.

Allan has a lengthy criminal record for exposing himself to youngsters dating back to 1984 and has been jailed on several occasions for similar offences.