Sean Peter Ross Maunders said he had a shotgun and told police he would shoot them if they came to his address.
This prompted armed officers to be called out and when they arrived, Maunders kicked out at them and was restrained using Pava spray, handcuffs and leg restraints.
He is currently subject to a suspended sentence.
He will be sentenced on October 10 after a probation report has been prepared.
Prosecuting advocate Rebecca Cubbon told the court that Maunders phoned police headquarters on August 16, at 4.30pm.
He said he had a shotgun and wouldn’t hesitate to use it if officers came to his address.
He then ended the call but police called him back.
Maunders again repeated his threat, saying: ‘There would be a body in the ****ing morning.’
Armed officers went to his home at Quine’s Corner but when they arrived Maunders kicked out at them, which resulted in him being Pava sprayed, handcuffed and put in leg restraints.
He was interviewed later and admitted that his call would have caused officers to feel threatened.
Defence advocate Stephen Wood said that his client was a man who has struggled with his mental health and has been receiving assistance.
Mr Wood said that he had been engaging well with probation as part of his suspended sentence.
‘He accepts police have an obligation to attend in these circumstances,’ said the advocate.
Deputy High Bailiff Rachael Braidwood granted bail in the sum of £500 with conditions to live at his home address and to contact probation and co-operate with the preparation of the report.