Police put a Dundee street in lockdown after an angry mob targeted a man accused of child sexual grooming offences.
Ross Ottaway appeared in court to face two charges of sending an indecent communication and of having communicated with a youngster with the intention of making arrangements to meet them.
The 36-year-old made no plea or declaration and was committed for further examination at Dundee Sheriff Court.
He was charged under the Protection of Children and Prevention of Sexual Offences (Scotland) Act and the Sexual Offences (Scotland) Act.
Ottaway was released on bail and then taken to temporary accommodation on Honeygreen Road, Linlathen, under police escort after his private court appearance.
But residents on the street reacted angrily after finding out that the alleged sex offender was being moved into the area.
Kim Taylor, 31, saw the commotion unfold and said the street was on “lockdown”.
She said: “I pulled up at about 4.30pm and there were neighbours in the street, so I asked what was going on and they said someone who had been charged with grooming offences had been moved into the homeless unit.”
A spokeswoman for Police Scotland said that “all reasonable steps” were being taken to ensure public safety.
It is understood Ottaway has been moved to an alternative secret location outwith Dundee.