A man brandished a knife and racially abused police on the day he came out of prison.
Martin Cawley, 27, of Linton Grove, Rastrick, who appeared in court charged with racially abusing two police officers, has 174 previous offences on his criminal record.
Officers were called to the home of his ex-partner at Old Lane Court, Brighouse, after she contacted them on Monday, January 18.
The court heard Cawley resisted arrest and became aggressive after appearing at an upstairs window,
He was later seen at the living room window brandishing a knife with a five-inch blade and threatening officers.
He then picked on two of the officers and there was an outburst of racial abuse towards them.
Cawley appeared at the front door at around 10.30pm and police Tasered him twice - but it did not stop him.
He later surrendered to police and appeared at Calderdale Magistrates Court.
Cawley denied the charges but was found guilty of the offences and remanded in custody to appear at Bradford Crown Court.
He will be for sentenced on February 22.