“He said he had a gun and he put his fingers in his pocket. He was sprayed with CS gas twice and he was incapacitated.”

O’Brien, 40, later said in interview he should not have combined alcohol with his pain-relieving medication but he had bought a bottle of brandy.

He drank it in the back garden and was “off his box”. He told police he was feeling very emotional and had made a noose.

O’Brien, of Market Place, Somercotes, admitted using threatening behaviour towards police at Somercotes on February 28.

Sentencing was adjourned until April 30 for probation service reports and he was granted bail on condition he did not contact Ms Buckley.

His solicitor, Justine Dexter, said: “He suffers from carpal tunnel syndrome. That’s why he was taking medication and, along with alcohol, it made him behave in the way he did on the day of this offence.”

O’Brien denied two charges of possessing blades in public at Pye Bridge, Alfreton, on March 3. A trial will take place in June.