A man asked police to arrest him despite not having committed an offence and smashed a police car windscreen with a traffic cone when they refused.
John May, 34, of no fixed abode, admitted causing £600 of damage to a police vehicle on Thursday.
Depute fiscal Douglas Wiseman told the court May walked into police headquarters at West Bell Street shortly after midnight.
The fiscal said: “He approached the public inquiry office and stated he was wanted on an apprehension warrant.”
A police check was carried out in the presence of an officer and May was told there were no outstanding warrants at that time.
He left the station, only to return about an hour-and-a-half later, again claiming he was wanted on a warrant. The depute fiscal added: “The accused was again informed he was not wanted on any apprehension warrants.
“He then asked the witness and a PC if he could be arrested, anyway. The witness told him this was not possible.”
May left again but moments later, those in the police station heard a loud thud outside.
The officer and staff member went outside and saw the front windscreen of a police vehicle had been damaged and a traffic cone was lying on the ground near the vehicle.
May was caught on CCTV picking up the traffic cone and throwing it on to the police car.
He was arrested shortly after returning inside.
After spending a few hours in a cell, he appeared in court from custody, claiming he wanted to go to jail.
Solicitor Larry Flynn, defending, told the court his client was institutionalised and a drug addict, and that he wanted a prison sentence to help him “get clean”.
However, Sheriff George Way said he could not impose a prison sentence without reports and deferred sentencing until October 29, when they would become available.
May was remanded in the meantime.