A BALLINGRY man who threatened police officers at Dunfermline Police Station committed the offences through a "haze of valium", Dunfermline Sheriff Court heard.

Appearing for sentencing on Wednesday, Nathan Watters (28) had previously admitted behaving in a threatening or abusive manner by shouting, swearing, uttering threatening remarks, making offensive gestures and lunging at police officers on December 28.

He also behaved in a similar manner at Dunfermline Sheriff Court later that day when he shouted, swore, uttered threatening remarks, lunged at G4S staff and struck and kicked cell doors.

Depute Fiscal. Dev Kapadia, said police officers were carrying out checks of custodies who had been detained.

"They were unable to raise the accused when they knocked on the cell," he said. "They then entered the cell to check on his welfare and the accused immediately became aggressive towards them."

Watters, of Ballingry Road, Ballingry, was later escorted by G4S staff to the cells at Dunfermline Sheriff Court and still appeared to be agitated and continued to shout and swear.

After lunging at a G4S member of staff, he was restrained. Police officers were called to deal with him and he was taken back to the police station.

Solicitor, Kerr Sneddon, said his client had been taken to the police station for a relatively minor road traffic offence and, at that time, was cordial with police officers.

However, pills he had taken just before this kicked in at the police station and resulted in his aggressive behaviour.

"The offences were committed through a haze of valium," he said. "He is quite clear he acted like an idiot."

Sheriff Charles Macnair said the voluntary taking of drugs was no mitigation for committing the offence.

"The behaviour was disgraceful," he told Watters. "You lunged at a police officer, you threatened G4S staff and you did that in a court building.

"One of the features of a court building is that there are people here who are not here voluntarily and they are affected by your behaviour. The are entitled to be here under the protection of the Court."

He ordered Watters to a Community Payback Order requiring him to complete 300 hours of unpaid work within 12 months.