A HOMELESS man went to Dunfermline police station to purposely get arrested.

That was the opinion of Sheriff Craig McSherry, who sentenced Darren Allan on Wednesday to four months in prison.

The court heard that Allan was seeking accommodation when he first went into the police station for help but later became aggressive with officers.

Sheriff McSherry said: "He was there to get arrested", when hearing Allan's defence.

Depute fiscal Carrie Stevens explained that officers told Allan they could take him to a place but could not do much more than that to help him with his accommodation problems.

After he began shouting and swearing at officers, referring to one female constable as "fat" and a "bitch".

Allan was arrested and denied having anything illegal in his possession when he was asked by officers.

He was strip-searched and a red-shaped object was found in his possession.

The object was diamorphine and the quantity had a street value of around £75-£100.

When asked about it, Allan said he knew nothing about it.

Allan, 37, of no fixed abode, previously admitted that on September 26, at Dunfermline Police Station, Holyrood Place, he behaved in a threatening or abusive manner which was likely to cause a reasonable person to suffer fear or alarm in that he did shout, swear, utter offensive remarks and utter threats of violence, and he had in his possession a controlled drug, namely diamorphine, with intent to supply it to another.

Defence solicitor David Bell said: "Mr Allan had been staying at James Bank Hostel when an incident occurred that required him to leave there.

"He had been asking for help from the council and had nowhere to go, then he went to the police.

"I believe they tried to help at first.

"Some of the diamorphine was used for his own purposes but some of it would have been given to others too.

"Social work had originally confronted him about being in custody for supplying drugs.

“He does have a lengthy record."

The court was told that Allan was subject to a drug testing order and that his accommodation situation remained a problem because he had no support from family.

He was sentenced to four months in prison backdated to September 26.