When a Shepton Mallet man saw his girlfriend being attacked in the street outside his home he grabbed a home-made weapon and threatened the attackers with it.
CCTV operators informed the police that they had seen a male with what looked like a baseball bat with a chain attached to it, going down an alleyway and returning without the weapon.
When police searched the alleyway they found the implement and Lee Ian Godfrey was arrested.
Godfrey, 20, of Town Street, pleaded guilty to being in possession of an offensive weapon, namely a baseball bat with a chain attached, in Shepton Mallet on April 22. He also admitted failing to surrender to bail on May 14 when he was brought before South Somerset Magistrates in custody.
Prosecutor Sarah Rhodes said that police were called to Town Street following reports of a disturbance and Godfrey also called the police saying his girlfriend had been assaulted.
After the police had been told the defendant had been seen with the weapon down an alleyway they searched and found the bat and he admitted he had put it there.
He said it was a table leg about two feet long with a 30 inch length of bicycle chain attached to the top and said that he had used it to scare off a man and woman who had been assaulting his partner.
"Instead of letting them beat his girlfriend up he took the bat-type weapon with him to try and scare them off," said Miss Rhodes.
"The male saw him and disappeared and Godfrey said that he did not intend using the bat adding that it was a scare tactic.
"He said it was something he had decided to make in case anyone decided to fight with him.
"He made it two or three days before the incident because the police had taken all his offensive weapons and he wanted some protection."
Defending solicitor Jeffrey Bannister said Godfrey was in his flat when his girlfriend returned from a night out and was being attacked by a male and female outside.
"He went outside to try and stop it and things escalated from there so he went back inside and phoned the police," he explained.
"He then heard even more commotion outside and fearing for his girlfriend's safety he picked up the item.
"He had no intention of hitting anybody with it but just wanted to scare them away and started waving it around."
The magistrates adjourned he case to June 18 for a pre-sentence report to be prepared and released Godfrey on unconditional bail.