A refuse collector armed himself with a bread knife after his girlfriend refused to leave a party at a neighbour's flat.
James Gibb told police he took it for his own protection because there were six men among the partygoers.
But after a row with his girlfriend in the bathroom, another woman grabbed the 12-inch blade off him and threw it out of the window, said Andrew Evans, prosecuting at Worcester Crown Court.
Gibb, aged 30, of Burcot Lane, Bromsgrove, pleaded guilty to possession of an offensive weapon.
He was fined £350 and ordered to carry out 50 hours unpaid community work.
The defendant was drunk when he, together with his girlfriend and their baby son, attended the party in the early hours of March 12 last year.
He began to stare at the men in "an odd way" because his girlfriend was enjoying herself in their company, said Mr Evans. Gibb left the party for 45 minutes but returned with the knife sticking out of his back pocket. Guests became concerned. After he was disarmed he was ordered to leave the party. Police found the knife in the garden.
They discovered Gibb asleep at home and arrested him.
He told officers his girlfriend refused to leave the flat. But he did not threaten anyone with the knife and had acted out of character, said Mr Pardeep Tiwana, defending.
Gibb, who works for Bromsgrove District Council, had no previous convictions for violence. He was given a not guilty verdict on a second charge of assault.
Judge Andrew Geddes told the defendant: "I'm quite satisfied you were drunk at the time. It was a very foolish thing to do in your state. You might have done something idiotic."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article