German police in Freiburg gave a stern warning to the public after a woman posted a picture of a man on social media she believed had molested her 12-year-old daughter in order to enlist the help of the public to identify the man.

The alleged sex attack took place aboard a train from Freiburg to Schliengen and saw a man, later reportedly identified as a Gambian migrant, approach the woman’s 12-year-old daughter and touch her sexually, Badische Zeitungreports.

The mother was able to get a picture of the man while he was on the train and posted the picture to Facebook, asking for users to help her identify who he was.

Within 24 hours the post had been shared 10,000 times and resulted in the police warning her that publishing the photo was unlawful.

Freiburg police published their own Facebook post with the image of the man pixelated and said, “We point out that the publication of portrait photos without the consent of the depicted is a criminal offence and can result in prosecution by the police.”

Several days later police arrested the suspect, identified as a 34-year-old from Gambia, with Katharina Kessler, spokeswoman for the Federal Police Inspectorate of Weil am Rhein, noting that the pictures did help the investigators identify the man.

“The images were a clue that led to the investigation of the suspect,” she said, but did not add any more detail as to where he was arrested.

The attack is just the latest involving migrant suspects in Freiburg, which saw the alleged brutal gang rape of an 18-year-old girl in October that led to the arrest of seven Syrian asylum seekers in connection with the attack.

The city was also the location of the rape and murder of student Maria Ladenburger, whose attacker Hussein Khavari was sentenced to life in prison earlier this year in March.

Follow Chris Tomlinson on Twitter at @TomlinsonCJor email at ctomlinson(at)breitbart.com