A man seen walking down the street late at night armed with a machete was tasered after ignoring police demands to stop.
Police found Christopher Crane, 35, with the weapon in Grange Road, Hartlepool, at around midnight on July 27.
Teesside Crown Court heard he had it to frighten a gang of youths said to have been threatening him.
But a judge said he could not take the law into his own hands and jailed him for 146 days under a ‘two strike’ rule for possession of an offensive weapon.
Crane was previously caught with a home-made knuckle-duster when police were called to a domestic incident in September last year.
A member of the public reported seeing a man with a machete in Tankerville Street at 11.50pm. Crane was in Grange Road with a friend when police arrived.
Jenny Haigh, prosecuting, said: “Mr Crane was spoken to by officers, he ignored their instructions to stop and as a result of that he was tasered.”
Crane was found to have the weapon up his sleeve. When interviewed, he said a gang of youths had earlier been hitting his front door in Sheriff Street with sticks and making threats.
Miss Haigh said: “He said he wasn’t going to use it to hurt anyone, but merely to threaten those males if he saw them.”
Stephen Constantine, mitigating, said Crane had logged more than 20 incidents of harassment between March and August at the request of police.
Mr Constantine said: “He has made numerous approaches to the police. He felt, he tells me, at the end of his tether.”
He added the machete was not brandished or used adding Crane did not realise it was the police.
Judge Howard Crowson said: “These matters can result in tragic circumstances when a person takes out a weapon like that, even if they intend only to use it for threatening and not anything else.
“It’s not that there’s no sympathy for your difficulties, simply you cannot take matters into your own hands.”