A legal highs addict tore off his clothes because he thought they were demons, Dundee Sheriff Court heard.
Kyle Grewar then went out into the street naked, and was seen by local schoolchildren.
The court heard Grewar, 26, was completely unclothed and shouting on Strathmartine Road at 6.30pm on November 10 last year.
Fiscal depute Laura Bruce said: “A witness within a hairdresser’s below a first floor flat on Strathmartine Road became aware of noise coming from the flat above, and heard shouting.
“The witness then looked outside and saw three schoolchildren in their teens walking up the road and saw Grewar come out of a flat completely naked.
“He appeared to be shouting in the direction of the hairdresser’s.
“Police were contacted and by the time they attended Grewar was back inside.
“Officers went to the flat and knocked on the door where he answered wearing jogging bottoms.
“They noted he seemed emotionally distressed and under the influence of something and smelled heavily of alcohol.”
Grewar was detained and police noted he was “extremely excitable” and difficult to talk to.
Solicitor Grant Bruce, defending, said: “He tells me he thought his clothes were demons and that’s why he took them off, but he has no recollection of going into the street and behaving like that. It was only when his friend told him what had happened that he had any idea of it.
“He had been taking alcohol and legal highs, which he admits he has become addicted to.”
Mr Bruce added that Grewar had taken legal highs during the time he committed three further offences all of which he admitted at court.
Grewar, a prisoner at Perth, admitted that on May 3 2013, he forced his way into a flat on Clepington Street, and assaulted Donna Cameron, and behaved in a threatening or abusive manner by shouting and swearing.
He also admitted a charge of police assault by attempting to headbutt PC Kieran Bradley and struggling violently with him on March 18 this year.
And he admitted behaving in a threatening or abusive manner by walking around a public street whilst naked, in full view of members of the public, including schoolchildren, at Strathmartine Road.
He was jailed for a total of 12 months for all offences.