A 21-year-old man swung a hammer in a street fight after his dad was stabbed, a court heard.
James Crammen armed himself during a dispute with a man he claimed was selling drugs.
A judge gave Crammen a suspended sentence partly because he had not gone looking for trouble.
"Police were called at about 1am to Cornwall Street in Hartlepool," said Jon Harley, prosecuting at Teesside Crown Court.
"Officers were told this defendant's father, also James, had been stabbed.
"The defendant received a bloody nose in this initial altercation.
"Officers were given the names of suspects, and they left the house to go in search of them."
When police returned a short time later they found four men fighting in the street, the court heard.
"One of these was the defendant James Crammen," said Mr Harley.
"He was brandishing a hammer which he threw towards the house next door."
Crammen, of Cornwall Street, Hartlepool, admitted possession of an offensive weapon on August 12.
Helen Towers, defending, said in mitigation: "A drugs dealer had targeted Mr Crammen's young cousin.
"Mr Crammen was also concerned for the welfare of his mother and another child who was present.
"After his windows were put out, the men returned, and Mr Crammen made the poor decision to threaten them with the hammer.
"He is now living out of the area with his partner and their 10-month-old son."
Judge Peter Armstrong sentenced Crammen to six months in prison, suspended for two years, and ordered him to complete 20 rehabilitation activity days.
The judge told him: "I accept trouble came to you that night, which is what saves you from going straight to prison today.
"You should bear in mind that if you do something similar again a minimum sentence of six months will apply."
"A hammer is a potentially lethal weapon."
The hammer was confiscated and will be destroyed.