A funeral-goer who later turned up at a garda station and began banging on the door was "overcome by the drama of the situation", a court heard.
Father-of-three Gavin Scully (37) lost the head and began hurling abuse at officers when they tried to help him.
Judge Michael Walsh put him on a one-year peace bond after he pleaded guilty to public order offences.
Scully, of Old County Road, Crumlin, admitted threatening, abusive and insulting behaviour and failing to follow garda directions.
Dublin District Court heard the incident happened at Sundrive Road Garda Station last December 22. It was 5.50am and Scully banged on the door, saying he wanted to make a complaint about something.
When gardai spoke to him he became abusive and failed to desist when directed. He was arrested and charged.
The accused had a number of previous convictions, the court was told.
Scully had gone to the station with "good intentions", said his solicitor, Michael Hanahoe.
He had attended a funeral earlier, was "overcome by the drama of the situation" and lost his head.
He now regretted his behaviour, Mr Hanahoe told the judge.
The court heard Scully was in employment and was supp- orting three children.
Mr Hanahoe asked the judge to be as lenient as he could.
Judge Walsh placed him on a bond to keep the peace and be of good behaviour for 12 months.