STAFF in a Dunfermline supermarket were subjected to threats and sectarian and offensive remarks after refusing to serve alcohol to an already drunk man.

William McLeod's solicitor said taking alcohol had led to him going "spectacularly off the rails" during the incident, which saw him jailed for four months.

He told a store manager at Asda St Leonards that he wouldn't be responsible for what he did next as it would be the devil and, when eventually arrested, he threatened to firebomb police officers' homes.

Appearing for sentencing at Dunfermline Sheriff Court on Wednesday, McLeod, 42, of Whirlbut Crescent, had earlier admitted that on October 11, he acted in an aggressive manner, shouted, swore, challenged police to fight and uttered sectarian and offensive remarks.

He also uttered threats of violence to police officers, then in the process of lawfully detaining him, threatened to follow them home, burn them and petrol-bomb their homes.

Depute fiscal Azrah Yousaf said McLeod had gone into Asda St Leonards at around 7.30pm and had attempted to buy more alcohol and had been declined because he was intoxicated.

A store section manager was called to deal with him as he was acting erratically, ranting about the devil and other random subjects.

"He was ushered to the front of the store by staff members and became more aggressive," said Ms Yousaf. "At that stage, he was getting right in the face of the section manager and stating he would not be responsible for what he did next and that it would be the devil.

"He then became friendly and asked her for a kiss."

The disturbing behaviour continued and McLeod began to shout at customers, asking them to buy him alcohol. He continued ranting and left the store before returning shortly before 9pm.

He then started to shout at staff members and challenged passing customers to fight and his behaviour was seen to visibly upset young children in the store.

Wearing a blue Rangers football shirt, he took hold of the badge on the shirt and shouted: "F*** the Pope, F*** the IRA. I am a true protestant."

McLeod then started to rant about Jews, Pakistanis, how Wallmart was poisoning the world and complaining about the Government.

Police arrived and detained him. While he was being put in the van, he said he would find out where they stayed and said he would smash their doors down, burn them and petrol-bomb their homes.

Solicitor James Moncrieff said his client accepted his behaviour had been appalling and was aware those involved would have been frightened by his behaviour.

"He has very little memory of any of this," he told the court. "He is ashamed of his behaviour and knows his behaviour was not acceptable and was offensive in today's society.

"As well as his behaviour being criminal, it was bizarre and that is, to an extent, linked to his mental health. He suffers from schizophrenia and has support in the community managing that condition.

"He normally doesn't consume alcohol because it can exacerbate his symptoms. He was offered alcohol by a friend and, as a result, things went off the rails pretty spectacularly.

"What he was saying about Wallmart taking over the world and poisoning the world, he has indicated, is what he sometimes hears in his head."

Sheriff Charles Macnair said he was satisfied there was not an appropriate alternative sentence to a custodial one.

"Charge one involved two distinct episodes of public disorder within Asda directed against staff and customers," he said. "As far as staff are concerned, they have nowhere to go. They are not entitled to leave you.

"They are entitled to the protection of the court from such behaviour and that behaviour included sectarian remarks of a grossly offensive manner.

"When detained, you then made threats to police officers including a threat to petrol-bomb their houses and, again, police officers are entitled to the protection of the court."