A man who made homophobic remarks to police officers after being arrested had sentence deferred for reports and a restriction of liberty order assessment.
Michael Watson, 27, of Ballindean Road, had earlier caused a breach of the peace and acted aggressively towards his former partner, banging on her door and staring at her through her letterbox.
Fiscal depute Laura Bruce told the court Jane Small was in bed at 6am and became aware of someone knocking on the door.
She saw Watson looking through the letterbox asking to come in but, as he was smelling strongly of alcohol, she told him to leave.
Mrs Bruce said he then became aggressive and started to shout, repeatedly banging on the door and kicking it.
Neighbours heard the commotion, she said and called the police. When they arrived, they found him lying slumped outside her door.
He began to shout and swear at the officers and was arrested and taken to Police HQ where he continued to be aggressive towards them, calling them homophobic names, she said.
Solicitor John Boyle told the court Watson lived close by and believed he had gone to the wrong door. He had been drinking heavily for a few days, he said.
Watson admitted that on May 19, at Balbeggie Street, he behaved in a threatening or abusive manner likely to cause fear or alarm, repeatedly knocked on the front door of the flat, attempted to enter while uninvited, repeatedly requested entry there, shouted, swore, acted in an aggressive manner towards Ms Small, stared at her through the letterbox and kicked and banged on the door.
He further admitted that on the same date at Balbeggie Street, during the course of a journey in a marked police vehicle between there and Police HQ, and at headquarters, he behaved in a threatening or abusive manner likely to cause fear or alarm, shouted and swore, acted in an aggressive manner towards police officers, uttered homophobic remarks and threats of violence.
Sheriff Alastair Carmichael said it was his sixth domestic conviction and added: “He has had his chances.”
He deferred sentence until June 14 for reports and a restriction of liberty assessment and said he should not expect a non-custodial sentence.