Police officers who were called to a Sowerby Bridge house by a concerned neighbour were confronted by a drunken man brandishing two kitchen knives, a court heard.
Gareth Hegarty, 36, ignored repeated demands to drop the weapons during the incident at Oliver Close last month and he was eventually detained after officers used CS spray on him.
Bradford Crown Court heard that Hegarty, who had no previous convictions, had been goading the officers during the early hours stand-off at the house and had made threats to stab them.
Following his arrest on August 4, Hegarty said he had returned home in a drunken state after an argument with an ex-girlfriend.
Hegarty told police he only had a vague recollection of picking up the knives and would not have used them on the officers.
His lawyer Ashok Khullar said Hegarty was a valued employee at his workplace and he had difficulty explaining why he had behaved in a way which was out of character that night.
“He feels genuine shame for what he has done,” said Mr Khullar.
Hegarty admitted the charge of affray and today Recorder Margia Mostafa sentenced him to a six-month prison sentence suspended for a year.
She also ordered Hegarty to undertake a 15-day activity requirement as part of the sentence.